# Flatten the index json data

**URL:** https://discuss.elastic.co/t/flatten-the-index-json-data/251076
**Category:** Logstash
**Created:** [October 6, 2020, 7:02am UTC](https://discuss.elastic.co/t/flatten-the-index-json-data/251076 "2020-10-06T07:02:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Abhi6](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Abhi6](https://discuss.elastic.co/u/Abhi6)
#### Post date: [October 6, 2020, 7:02am UTC](https://discuss.elastic.co/t/flatten-the-index-json-data/251076/1 "2020-10-06T07:02:46Z")

</div>

```
[

```

"code"  
{  
1  
},  
"foo"{  
"bar"  
},  
"foo1"  
{  
"number": 1,  
"type": "In progrss",  
"submit\_time": "2020-10-04  
"id\_type": 2153707,  
"order\_id": 1601849877,  
"foo2": [  
"xyz",  
"qwe",  
"yty"  
],  
"order\_date": 19/09/2020,  
"shipping\_date": "2020-10-04",  
"shipping\_id": "89775555",  
"tracking\_id": "98876",

}  
]

I want it like like this to flatten foo1  
"number": 1,  
"type": "in progrss",  
"submit\_time": "2020-10-04T16:17:33-0600",  
"id\_type": 2153707,  
"order\_id": 1601849877,  
"order\_date": 19/09/2020,  
"shipping\_date": "2020-10-04T16:17:57-0600",  
"shipping\_id": "89775555",  
"tracking\_id": "98876",  
"order\_id": 1601849877,  
"foo2": [  
"xyz",  
"qwe",  
"yty"  
],

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [October 6, 2020, 1:37pm UTC](https://discuss.elastic.co/t/flatten-the-index-json-data/251076/2 "2020-10-06T13:37:42Z")

</div>

Do you have a question?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 3, 2020, 1:37pm UTC](https://discuss.elastic.co/t/flatten-the-index-json-data/251076/3 "2020-11-03T13:37:49Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
