Query nested Document with all equal


(Vishal Wadhwa) #1

Hello I have a document with nested fields as array. Is there a simple way to get the search result of "All child equal" and "All child not equal" Kind of operations?

For example I have below Document -

{
"objectId":"1234",
"objectName":"Frist",
"childObjects":[
{
"name":"child1",
"childState":"new",
"childValue":"1232"
},
{
"name":"child2",
"childState":"open",
"childValue":"1232"
},
{
"name":"child3",
"childState":"closed",
"childValue":"1232"
}
]
}

I want to find an object where whose all child record has state "new"

or

Get document where none of the child has state as "new"


(system) #2

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