# Using filter on nested objects

**URL:** <https://discuss.elastic.co/t/using-filter-on-nested-objects/68966>\
**Category:** Logstash\
**Created:** [December 14, 2016, 5:03am UTC](https://discuss.elastic.co/t/using-filter-on-nested-objects/68966 "2016-12-14T05:03:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shambar](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@shambar](https://discuss.elastic.co/u/shambar)\
**Post date:** [December 14, 2016, 5:03am UTC](https://discuss.elastic.co/t/using-filter-on-nested-objects/68966/1 "2016-12-14T05:03:58Z")

</div>

I am having an issue trying to get logstash to see the items in the array beyond the first item.

the data will come in like.

{"id": "430229930",  
"item\_tbl" :[{"itemid": 1,"itemname":"eggs","quantity": 10},{"itemid": 2,"itemname":"milk","quantity": 10}]}

I can access the first item in the array by referencing [item\_tbl][0][itemname]

I know the second item is [1] but how do I get logstash to mutate or manipulate all the items in the array?

the documents will vary on the number of items in the array.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 18, 2016, 4:12pm UTC](https://discuss.elastic.co/t/using-filter-on-nested-objects/68966/2 "2016-12-18T16:12:06Z")

</div>

That depends on the filter(s) you want to use. Arrays of values aren't handled uniformly across all plugins.

---

<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:** [January 15, 2017, 4:12pm UTC](https://discuss.elastic.co/t/using-filter-on-nested-objects/68966/3 "2017-01-15T16:12:10Z")

</div>

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