# How to XPOST JSON object that has nested arrays and other types in the same JSON document?

**URL:** <https://discuss.elastic.co/t/how-to-xpost-json-object-that-has-nested-arrays-and-other-types-in-the-same-json-document/54360>\
**Category:** Elasticsearch\
**Created:** [June 30, 2016, 5:37am UTC](https://discuss.elastic.co/t/how-to-xpost-json-object-that-has-nested-arrays-and-other-types-in-the-same-json-document/54360 "2016-06-30T05:37:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ndixit](https://avatars.discourse-cdn.com/v4/letter/n/c2a13f/32.png) [@ndixit](https://discuss.elastic.co/u/ndixit)\
**Post date:** [June 30, 2016, 5:37am UTC](https://discuss.elastic.co/t/how-to-xpost-json-object-that-has-nested-arrays-and-other-types-in-the-same-json-document/54360/1 "2016-06-30T05:37:41Z")

</div>

example 1.  
{"layout-options": "Total Compensation with These Assumptions"}

{"layout-options": [  
[  
[  
{  
"fontsize": "10",  
"txtValue": "Days to Ship by Product"  
}  
]  
]  
]}

{ "layout-options": [  
[  
[  
{  
"bold": "true",  
"fontalignment": "0",  
"fontcolor": "#906800",  
"fontname": "Segoe UI",  
"txtValue": "Estimated Compensation:"  
},  
{  
"bold": "true",  
"fontalignment": "0",  
"txtValue": "Æ"  
}  
]  
]  
]}

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [July 5, 2016, 6:33am UTC](https://discuss.elastic.co/t/how-to-xpost-json-object-that-has-nested-arrays-and-other-types-in-the-same-json-document/54360/2 "2016-07-05T06:33:45Z")

</div>

Hi @ndixit,

I am not sure what you want to achieve. To me it looks you want to index multiple documents at once. For that you can use the [bulk API](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-bulk.html)

Daniel

---

<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:** [July 5, 2017, 10:38pm UTC](https://discuss.elastic.co/t/how-to-xpost-json-object-that-has-nested-arrays-and-other-types-in-the-same-json-document/54360/3 "2017-07-05T22:38:24Z")

</div>

Closed on July 5, 2017, 10:38pm UTC


