After moving all the elements from the lookupResult field directly in the JSON, we don't need that field anymore. Similarly, we don't want to store the headers or the host fields in the Elasticsearch index, so we remove them all at once using the following operation:
remove_field => ["lookupResult", "headers", "host"]
We finally have the JSON payload in the structure that we want in the Elasticsearch index. Next, let us see how to send it to Elasticsearch.