# How to query array of objects with multiple filters

**URL:** <https://discuss.elastic.co/t/how-to-query-array-of-objects-with-multiple-filters/265921>\
**Category:** Elasticsearch\
**Created:** [March 2, 2021, 8:21am UTC](https://discuss.elastic.co/t/how-to-query-array-of-objects-with-multiple-filters/265921 "2021-03-02T08:21:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![111417](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111417/32/80508_2.png) [@111417](https://discuss.elastic.co/u/111417)\
**Post date:** [March 2, 2021, 8:21am UTC](https://discuss.elastic.co/t/how-to-query-array-of-objects-with-multiple-filters/265921/1 "2021-03-02T08:21:21Z")

</div>

As title,  
The file is roughly as follows:  
doc01 [`{ "product": "apple", "price": 12 }` , `{ "product": "grave", "price": 18 }`]  
doc02 [`{ "product": "apple", "price": 15 }` , `{ "product": "banana", "price": 15 }`]  
doc03 [`{ "product": "apple", "price": 18 }` , `{ "product": "banana", "price": 15 }`]  
I want to get the unique value for product and only carry by Price\>=15  
the output look likes  
apple count:2  
grave count:1  
banana count:2

I'm really wonder this  
THks!

---

<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:** [March 30, 2021, 8:21am UTC](https://discuss.elastic.co/t/how-to-query-array-of-objects-with-multiple-filters/265921/2 "2021-03-30T08:21:46Z")

</div>

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