I have a Collection of objects :
db.coll.find().pretty();
{
"_id" : "1",
"elements" : [
{ "key" : "A", "value" : 10 },
{ "key" : "B", "value" : 1 },
]
},
{
"_id" : "2",
"elements" : [
{ "key" : "A", "value" : 1 },
{ "key" : "C", "value" : 33 },
]
}
I want to find the documents that contain an element with "key" equal to "A" AND its "value" is greater than 5.
Not sure if this is possible without using the aggregation framework.