# Filter on nested object to return all fields under nested object with value zero

**URL:** <https://discuss.elastic.co/t/filter-on-nested-object-to-return-all-fields-under-nested-object-with-value-zero/317488>\
**Category:** Elasticsearch\
**Created:** [October 26, 2022, 9:07am UTC](https://discuss.elastic.co/t/filter-on-nested-object-to-return-all-fields-under-nested-object-with-value-zero/317488 "2022-10-26T09:07:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![monaadelrabea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monaadelrabea/32/103251_2.png) [@monaadelrabea](https://discuss.elastic.co/u/monaadelrabea)\
**Post date:** [October 26, 2022, 9:07am UTC](https://discuss.elastic.co/t/filter-on-nested-object-to-return-all-fields-under-nested-object-with-value-zero/317488/1 "2022-10-26T09:07:01Z")

</div>

I need to filter on an index that have nested object called params, this object contains dynamic fields how to return only docs that contain fields with zero value under params nesetd object  
Ex:  
"params": {  
"ePwrV":[  
28.183  
],  
"di16":[  
1  
],  
"rssi1":[  
55  
],  
"di15":[  
0  
],  
"di14":[  
0  
],  
"di13":[  
0  
],  
"di12":[  
0  
],  
"di11":[  
0  
],  
"di10":[  
0  
],  
"di2":[  
0  
],  
"di1":[  
1  
],  
"ai4":[  
733  
],  
"di4":[  
0  
],  
"di3":[  
0  
],  
"di6":[  
0  
],  
"di5":[  
1  
],  
"lac1":[  
3718  
],  
"di8":[  
1  
],  
"protocol":[  
"bce"  
],  
"di7":[  
1  
],  
"di9":[  
0  
],  
"iPwrV":[  
4.121  
],  
"cid1":[  
39572  
],  
"odometer":[  
1116211952  
],  
"spd":[  
45  
],  
"sat":[  
12  
],  
"ta":[  
0  
],  
"hdop":[  
1  
],  
"mcc1":[  
420  
],  
"protocol.keyword":[  
"bce"  
],  
"mnc1":[  
3  
]  
}  
Note: This fields is dynamic as some records may have other fields.

---

<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:** [November 23, 2022, 9:07am UTC](https://discuss.elastic.co/t/filter-on-nested-object-to-return-all-fields-under-nested-object-with-value-zero/317488/2 "2022-11-23T09:07:54Z")

</div>

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