# Retreiving an array from nested field

**URL:** <https://discuss.elastic.co/t/retreiving-an-array-from-nested-field/115555>\
**Category:** Logstash\
**Created:** [January 15, 2018, 2:17pm UTC](https://discuss.elastic.co/t/retreiving-an-array-from-nested-field/115555 "2018-01-15T14:17:25Z")\
**Posts on this page:** 3\
**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 15, 2018, 2:17pm UTC](https://discuss.elastic.co/t/retreiving-an-array-from-nested-field/115555/1 "2018-01-15T14:17:25Z")

</div>

I have data coming in in JSON format with a nested field which holds an array I would like to retrieve.  
Currently I am extracting the data from nested field via mutate plugin, such as:

mutate {  
add\_field =\> { "nested\_data" =\> "%{examples[arrays]}"}  
}  
This retrieves the data as string, in result I see:  
"nested\_data" =\> "8,1,-64,0,0,50,16,3,25,50,1,0,0,18,-41,-112,-15,112,0,0,0,1,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,99",

How can I retrieve so my data stays in array? Or how do I convert back to array?

---

<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 16, 2018, 8:11am UTC](https://discuss.elastic.co/t/retreiving-an-array-from-nested-field/115555/2 "2018-01-16T08:11:03Z")

</div>

Any ideas?

---

<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 13, 2018, 8:11am UTC](https://discuss.elastic.co/t/retreiving-an-array-from-nested-field/115555/3 "2018-02-13T08:11:04Z")

</div>

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