# Push json array to elasticsearch

**URL:** <https://discuss.elastic.co/t/push-json-array-to-elasticsearch/304099>\
**Category:** Kibana\
**Created:** [May 6, 2022, 7:39am UTC](https://discuss.elastic.co/t/push-json-array-to-elasticsearch/304099 "2022-05-06T07:39:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SnehaB](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@SnehaB](https://discuss.elastic.co/u/SnehaB)\
**Post date:** [May 6, 2022, 7:39am UTC](https://discuss.elastic.co/t/push-json-array-to-elasticsearch/304099/1 "2022-05-06T07:39:13Z")

</div>

Hi Team,

I am trying to pushing the json array of data to Elasticsearch but its showing as error  
How to push below json array to Elasticsearch:-

[  
{  
"operation": "create",  
"senderid": "jmbaxi001",  
"values": [  
{  
"VENDOR\_ID": "9",  
"VENDOR\_SERVICE\_ID": 15,  
"IS\_ACTIVE": 1  
},  
{  
"VENDOR\_ID": "8",  
"VENDOR\_SERVICE\_ID": 17,  
"IS\_ACTIVE": 1  
}  
]  
}  
]

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [May 6, 2022, 1:59pm UTC](https://discuss.elastic.co/t/push-json-array-to-elasticsearch/304099/2 "2022-05-06T13:59:51Z")

</div>

Each element of your array is a different object? If that's the case you need to split your array and insert each document independently with the [index API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html) or use the [bulk API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html) to send your documents.

This can be done directly through the HTTP APIs or with any Elasticsearch client SDK (python, go, javascript, etc).

---

<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:** [June 3, 2022, 1:59pm UTC](https://discuss.elastic.co/t/push-json-array-to-elasticsearch/304099/3 "2022-06-03T13:59:57Z")

</div>

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