# How to create nested object when transfering data from one index to another via logstash

**URL:** <https://discuss.elastic.co/t/how-to-create-nested-object-when-transfering-data-from-one-index-to-another-via-logstash/357779>\
**Category:** Logstash\
**Created:** [April 19, 2024, 9:07am UTC](https://discuss.elastic.co/t/how-to-create-nested-object-when-transfering-data-from-one-index-to-another-via-logstash/357779 "2024-04-19T09:07:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaustub\_Gupta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaustub_gupta/32/131437_2.png) [@Kaustub\_Gupta](https://discuss.elastic.co/u/Kaustub_Gupta)\
**Post date:** [April 19, 2024, 9:07am UTC](https://discuss.elastic.co/t/how-to-create-nested-object-when-transfering-data-from-one-index-to-another-via-logstash/357779/1 "2024-04-19T09:07:19Z")

</div>

```auto
The original index has a mapping:
   "GTIN": {    
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        }

And target index has mapping:
 "SAPEPCExtension": { 
          "properties": {
            "EPC": {             
              "type": "text",
              "fields": {
                "keyword": {
                  "type": "keyword",
                  "ignore_above": 256
                }
              }
            }, 
            "GTIN": {          
              "type": "text",
              "fields": {
                "keyword": {
                  "type": "keyword",
                  "ignore_above": 256
                }
              }
            }

```
