i have this format
but what i need is
is it anyway to do this by using filebeat
You could try to setup an Elasticsearch Ingest Pipeline. That will let you manipulate your data after it has been sent to Elasticsearch from Filebeat but before Elasticsearch indexes it. See https://www.elastic.co/guide/en/beats/filebeat/master/configuring-ingest-node.html for more information.
thanks it helped!