# Split array in Logstash

**URL:** <https://discuss.elastic.co/t/split-array-in-logstash/116197>\
**Category:** Logstash\
**Created:** [January 19, 2018, 9:26am UTC](https://discuss.elastic.co/t/split-array-in-logstash/116197 "2018-01-19T09:26:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moriol](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@moriol](https://discuss.elastic.co/u/moriol)\
**Post date:** [January 19, 2018, 9:26am UTC](https://discuss.elastic.co/t/split-array-in-logstash/116197/1 "2018-01-19T09:26:09Z")

</div>

I have data coming in, in following format via Logstash  
{ test =\> [  
[0] { "data"= "xyz"  
"field2"=\> "1234"  
}  
[1] { "data"= "xyz"  
"field2"=\> "1234"  
}  
[2] { "data"= "xyz"  
"field2"=\> "1234"  
}  
I want to split my fields, so each Logstash event is as follows:  
{ "data"= "xyz"  
"field2"=\> "1234"  
}  
{ "data"= "xyz"  
"field2"=\> "1234"  
}  
{ "data"= "xyz"  
"field2"=\> "1234"  
}

Whats the best way to extract data?

---

<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:** [February 16, 2018, 9:26am UTC](https://discuss.elastic.co/t/split-array-in-logstash/116197/2 "2018-02-16T09:26:42Z")

</div>

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