# How to parse dynamic array json through logstash?

**URL:** <https://discuss.elastic.co/t/how-to-parse-dynamic-array-json-through-logstash/238081>\
**Category:** Logstash\
**Created:** [June 22, 2020, 11:55am UTC](https://discuss.elastic.co/t/how-to-parse-dynamic-array-json-through-logstash/238081 "2020-06-22T11:55:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_rr](https://avatars.discourse-cdn.com/v4/letter/r/ce7236/32.png) [@Rahul\_rr](https://discuss.elastic.co/u/Rahul_rr)\
**Post date:** [June 22, 2020, 11:55am UTC](https://discuss.elastic.co/t/how-to-parse-dynamic-array-json-through-logstash/238081/1 "2020-06-22T11:55:39Z")

</div>

Here is my array json.  
"service\_lines": [  
{  
"id": 584942,  
"is\_approved": null,  
"aar": {  
"category": {  
"id": 42,  
"name": "Tires"  
},  
"system": {  
"id": 1,  
"name": "Tire"  
},  
"subsystem": {  
"id": 1,  
"name": "Tire"  
},  
"service": {  
"id": 53,  
"name": "Service Call - Tire"  
}  
},  
"vmrs": null  
}  
]  
These array type json is inside a nested json and I'm getting this data dynamically. Like sometimes i may get 4-5 arrays or even upto 10. I tried splitting the field, but nothing works well. Is there any way I can parse the data?  
Any suggestion is appreciated. Thanks much.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [June 22, 2020, 2:10pm UTC](https://discuss.elastic.co/t/how-to-parse-dynamic-array-json-through-logstash/238081/2 "2020-06-22T14:10:38Z")

</div>

> [@Rahul\_rr](#):
>
> Is there any way I can parse the data?

A json filter will parse arrays inside JSON objects. What do you not like about the result?

---

<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:** [July 20, 2020, 2:10pm UTC](https://discuss.elastic.co/t/how-to-parse-dynamic-array-json-through-logstash/238081/3 "2020-07-20T14:10:38Z")

</div>

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