# Parse json file with 100k/1 million records?

**URL:** <https://discuss.elastic.co/t/parse-json-file-with-100k-1-million-records/205659>\
**Category:** Logstash\
**Created:** [October 29, 2019, 11:58am UTC](https://discuss.elastic.co/t/parse-json-file-with-100k-1-million-records/205659 "2019-10-29T11:58:32Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Abdul\_Gaffar\_Shaikh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdul_gaffar_shaikh/32/78006_2.png) [@Abdul\_Gaffar\_Shaikh](https://discuss.elastic.co/u/Abdul_Gaffar_Shaikh)\
**Post date:** [November 4, 2019, 10:02am UTC](https://discuss.elastic.co/t/parse-json-file-with-100k-1-million-records/205659/6 "2019-11-04T10:02:43Z")

</div>

hi @Badger,

we have solved the issue , but now i am facing a different issue which is smilar to below link

> [@Can logstash handle array of nested objects?](https://discuss.elastic.co/t/can-logstash-handle-array-of-nested-objects/53558):
>
> I am unable to configure logstash to load an array of nested objects as described in the [elasticsearch guide](https://www.elastic.co/guide/en/elasticsearch/guide/current/nested-objects.html). I can map and load the array of nested objects via the elasticsearch REST API (as shown below), but I am unable to do the same via logstash when there is an unknown number of nested objects in the array (in this case, an unknown number of comments). Any suggestions? PUT /my\_index/blogpost/1 { "title": "Nest eggs", "body": "Making your money work...", "tags": [ "cash", "shares"…

some fields are added to the end of json like this

{"docId": "201","docOwner": "R909168111","docType":"delay","event1Timestamp":"2019-08-20T04:28:40.889Z", "**addinfo":[{"key": "clid","value": "p111"}**]  
}

filter {

mutate {  
strip =\> ["message"]  
}

if [message] == ']}' {  
drop{}  
}

mutate { gsub =\> ["message",",$",""] }

json {  
source =\> "message"  
}

}

but how to extract the nested array of inner objects and inserted as it is elasticsearch?

i get the output in logstash debug as

"addInfo" =\> [  
[0] {  
"key" =\> "clid",  
"value" =\> "p111"  
},  
[1] {  
"key" =\> "clid1",  
"value" =\> "p222"  
}  
],

but in elasticsearch the o/p is :-

"addInfo" : [  
{  
"key" : "clid",  
"value" : "p111"  
},  
{  
"key" : "clid1",  
"value" : "p222"  
}  
],

is that fine ?

---

_[View the full topic](https://discuss.elastic.co/t/parse-json-file-with-100k-1-million-records/205659)._
