Hi ,
Please let me know ,how to return documents that nested object count is greater than zero.
i want first filter nested object then return documents that have nested object number greather than zero.
products:[
{ id=1 ,number="01" ,name="iphone" ,prices:[{Enabled = true ,price = 1} ,{Enabled = false,price = 2}] } ,
{ id=2 ,number="02" ,name="samsung" ,prices:[{Enabled = false ,price = 10} ,{Enabled = false,price = 20}] },
]
for "products" document must be return products that have at least one "Enabled" prices.
result must be:
{ id=1 ,number="01" ,name="iphone" ,prices:[{Enabled = true ,price = 1}] }