# How to parse multiple nested arrays

**URL:** <https://discuss.elastic.co/t/how-to-parse-multiple-nested-arrays/344671>\
**Category:** Logstash\
**Created:** [October 9, 2023, 2:14pm UTC](https://discuss.elastic.co/t/how-to-parse-multiple-nested-arrays/344671 "2023-10-09T14:14:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankita\_Pachauri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankita_pachauri/32/61469_2.png) [@Ankita\_Pachauri](https://discuss.elastic.co/u/Ankita_Pachauri)\
**Post date:** [October 9, 2023, 2:14pm UTC](https://discuss.elastic.co/t/how-to-parse-multiple-nested-arrays/344671/1 "2023-10-09T14:14:05Z")

</div>

Hello everyone,

I am trying to parse a json document using logstash version 8.3.3. The json document has multiple nested arrays, to flatten the document split is being used inside the filter. The issue is that the splits are taking too long to complete almost 15-20 mins for 10 documents and most of the time this also hangs logstash. I have also tried using multiple workers without any luck. The system running logstash has 24 GB dedicated to logstash JVM. Does anyone know of a better method to parse the document properly, maybe without using split? (Attaching sample document and filter being used).

Sample Data:  
`{ "AppManager-response": { "result": { "response": { "Monitorinfo": { "Attribute": ["", "", "", "", "", "", "", "", "", "", "", "", "", ""], "CHILDMONITORS": [{ "CHILDMONITORINFO": [ { "CHILDATTRIBUTES": [ "", "", "", ""] }, { "CHILDATTRIBUTES": ["", "", "", ""] } ] }, { "CHILDMONITORINFO": [{ "CHILDATTRIBUTES": [ "", "", "", ""] }, { "CHILDATTRIBUTES": ["", "", "", ""] } ] } ] } } } } }`

Filter Used:

```auto
filter{

split{field => "[result][response][0][Attribute]"}
split{field => "[result][response][0][CHILDMONITORS]", target => "splitjson"}
split{field => "[splitjson][CHILDMONITORS]", target => "nestedsplitjson"}
split{field => "[nestedsplitjson][CHILDATTRIBUTES]", target => "finalsplitjson"}

}

```

Kindly assist.

---

<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 6, 2023, 2:14pm UTC](https://discuss.elastic.co/t/how-to-parse-multiple-nested-arrays/344671/2 "2023-11-06T14:14:56Z")

</div>

Closed on November 6, 2023, 2:14pm UTC

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