Consider a collection called 'scheme' with following documents. How to query all schemes with atleast element in prepaid array that contains "a" ? Here the first collection satisfies the criteria, since dataArray[0] has 'a'. The second collection does not. Thus, I want to query to find only such collections whole dataArray contains 'a' in one of its elements.
{
"plan":{
"dataArray" : [
{
"a" : "x",
"b" : "y",
"c" : "z"
},
{
"b" : "x",
"c" : "z"
}
],
}
}
{
"plan":{
"dataArray" : [
{
"b" : "y",
"c" : "z"
},
{
"b" : "x",
"c" : "z"
}
],
}
}