# Filter array of objects inside document

**URL:** <https://discuss.elastic.co/t/filter-array-of-objects-inside-document/61630>\
**Category:** Elasticsearch\
**Created:** [September 27, 2016, 3:54pm UTC](https://discuss.elastic.co/t/filter-array-of-objects-inside-document/61630 "2016-09-27T15:54:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maticzav](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@maticzav](https://discuss.elastic.co/u/maticzav)\
**Post date:** [September 27, 2016, 3:54pm UTC](https://discuss.elastic.co/t/filter-array-of-objects-inside-document/61630/1 "2016-09-27T15:54:56Z")

</div>

I have an array of objects inside each of my documents and each object contains parameters about image 1-whether this image is a preview of a document (boolean variable) and 2-image source.

Each documents also has some other parameters through which I query documents, but I suppose that's not the crucial information.

So, I want to know if it's possible to filter my documents' array of images to only get images(image objects) with preview parameter set to true and how would I achieve it?

Thanks!

---

<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 5, 2017, 10:16pm UTC](https://discuss.elastic.co/t/filter-array-of-objects-inside-document/61630/2 "2017-07-05T22:16:54Z")

</div>

Closed on July 5, 2017, 10:16pm UTC


