# Index Json file data into Elasticsearch

**URL:** <https://discuss.elastic.co/t/index-json-file-data-into-elasticsearch/189067>\
**Category:** Logstash\
**Created:** [July 5, 2019, 10:20am UTC](https://discuss.elastic.co/t/index-json-file-data-into-elasticsearch/189067 "2019-07-05T10:20:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![umeshmishra099](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umeshmishra099/32/47939_2.png) [@umeshmishra099](https://discuss.elastic.co/u/umeshmishra099)\
**Post date:** [July 5, 2019, 10:20am UTC](https://discuss.elastic.co/t/index-json-file-data-into-elasticsearch/189067/1 "2019-07-05T10:20:12Z")

</div>

I have a josn file with below data:

> [ {  
> "City": "0miya-ku",  
> "Company": "3COM",  
> "Country": "ARUBA",  
> "CountryCodeIso2": "AF",  
> "CountryCodeIso3": "AFG",  
> "LastName": "AABERG",  
> "Gender": "Male"  
> },  
> {  
> "City": "0saki-shi",  
> "Company": "3M",  
> "Country": "AFGHANESTAN ",  
> "CountryCodeIso2": "AX",  
> "CountryCodeIso3": "ALA",  
> "LastName": "AABY",  
> "Gender": "Female"  
> },  
> {  
> "City": "100. Yıl",  
> "Company": "A C NIELSEN",  
> "Country": "AFGHANISTAN",  
> "CountryCodeIso2": "AL",  
> "CountryCodeIso3": "ALB",  
> "LastName": "AADLAND",  
> "Gender": "M"  
> }  
> ]  
> I wanted to index in elasticsearch how i can do that.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 5, 2019, 10:32am UTC](https://discuss.elastic.co/t/index-json-file-data-into-elasticsearch/189067/2 "2019-07-05T10:32:46Z")

</div>

Does the file only contain that data, or is there more files?  
If it's just that then use curl or Developer Tools in Kibana.

---

<div class="post-metadata">

**Author:** ![umeshmishra099](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umeshmishra099/32/47939_2.png) [@umeshmishra099](https://discuss.elastic.co/u/umeshmishra099)\
**Post date:** [July 5, 2019, 10:40am UTC](https://discuss.elastic.co/t/index-json-file-data-into-elasticsearch/189067/3 "2019-07-05T10:40:19Z")

</div>

file contains more data 5 million around.  
I know if data is less i can do it directly.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 5, 2019, 10:41am UTC](https://discuss.elastic.co/t/index-json-file-data-into-elasticsearch/189067/4 "2019-07-05T10:41:36Z")

</div>

You'd be best off splitting those into individual documents and then using either Logstash or some custom code to send it to Elasticsearch.

---

<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:** [August 2, 2019, 10:41am UTC](https://discuss.elastic.co/t/index-json-file-data-into-elasticsearch/189067/5 "2019-08-02T10:41:36Z")

</div>

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