# Ingesting Json for Elasticsearch using Logstash

**URL:** <https://discuss.elastic.co/t/ingesting-json-for-elasticsearch-using-logstash/205737>\
**Category:** Logstash\
**Created:** [October 29, 2019, 6:20pm UTC](https://discuss.elastic.co/t/ingesting-json-for-elasticsearch-using-logstash/205737 "2019-10-29T18:20:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkdavis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bkdavis/32/54439_2.png) [@bkdavis](https://discuss.elastic.co/u/bkdavis)\
**Post date:** [October 29, 2019, 6:20pm UTC](https://discuss.elastic.co/t/ingesting-json-for-elasticsearch-using-logstash/205737/1 "2019-10-29T18:20:03Z")

</div>

I'm very new to Logstash and am trying to figure out how to properly ingest json into an elasticsearch index. I have a .json file that is perfectly formatted for my elasticsearch index however I can't figure out the best way to pass it to Elasticsearch. I can easily pass .json data in this format to elastic with CURL however I really would like to use logstash. I have tried using a json codec as well at made attempts with json filtering. I just can't figure out the right combination to get data from a .json file 'in the below format' into elasticsearch.

If someone could just point me in the right direction it would be very much appreciated!

Thank you

```
{"index": {"_index":"master","_type":"_doc","_id":"tsa/005910305881"}}

```

{"item\_number":"tsa/005910305881","context":["IRMN"],"rotation":"1","description":"bearing - taper cup ","powersearch": ["005910305881", "005910305881", "005910305881", "bearing", "-", "taper", "cup", "005910305881", "005910305881"],"imageurl":"cl713024.gif","catalog": [{"key":"TotalSource", "value":"tsa/sy42211|20817"}]}

---

<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 26, 2019, 6:20pm UTC](https://discuss.elastic.co/t/ingesting-json-for-elasticsearch-using-logstash/205737/2 "2019-11-26T18:20:08Z")

</div>

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