I have collection as follows .
{
"name" : "pqr" ,
"loc" :
[
{"area" : "c" , "country" : "d"},
{"area" : "w" , "country" : "r"}
]
}
I want to make which match such that only match the first element of array loc
that means if
- gives area as c or country d then it return document.
- gives area as w or country as r then does not return element
only match first element of mongo array
Is this possible in mongo ?
if some one knows plz reply
Thanks