# How to create a logtash conf file for import json file to elasticseaarch using logstash

**URL:** <https://discuss.elastic.co/t/how-to-create-a-logtash-conf-file-for-import-json-file-to-elasticseaarch-using-logstash/252168>\
**Category:** Logstash\
**Created:** [October 15, 2020, 10:20am UTC](https://discuss.elastic.co/t/how-to-create-a-logtash-conf-file-for-import-json-file-to-elasticseaarch-using-logstash/252168 "2020-10-15T10:20:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manuang](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@Manuang](https://discuss.elastic.co/u/Manuang)\
**Post date:** [October 15, 2020, 10:20am UTC](https://discuss.elastic.co/t/how-to-create-a-logtash-conf-file-for-import-json-file-to-elasticseaarch-using-logstash/252168/1 "2020-10-15T10:20:24Z")

</div>

I am new to logstash and elastic search. i want to import a json file to elastic search using logstash in my windows 10 system. how to create a logtash conf file for the below json. suggest me a sample config file.

json file  
[  
{  
"id": "0001",  
"type": "donut",  
"name": "Cake",  
"ppu": 0.55,  
"batters":  
{  
"batter":  
[  
{ "id": "1001", "type": "Regular" },  
{ "id": "1002", "type": "Chocolate" },  
]  
},  
"topping":  
[  
{ "id": "5001", "type": "None" },  
{ "id": "5002", "type": "Glazed" },  
]  
},  
{  
"id": "0002",  
"type": "donut",  
"name": "Raised",  
"ppu": 0.55,  
"batters":  
{  
"batter":  
[  
{ "id": "1001", "type": "Regular" }  
]  
},  
"topping":  
[  
{ "id": "5001", "type": "None" },  
{ "id": "5002", "type": "Glazed" },  
]  
},  
{  
"id": "0003",  
"type": "donut",  
"name": "Old Fashioned",  
"ppu": 0.55,  
"batters":  
{  
"batter":  
[  
{ "id": "1001", "type": "Regular" },  
{ "id": "1002", "type": "Chocolate" }  
]  
},  
"topping":  
[  
{ "id": "5001", "type": "None" },  
]  
}  
]

---

<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 12, 2020, 10:20am UTC](https://discuss.elastic.co/t/how-to-create-a-logtash-conf-file-for-import-json-file-to-elasticseaarch-using-logstash/252168/2 "2020-11-12T10:20:27Z")

</div>

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