Let me be straight with the question, OK I have document structure like
let the collection name be sample;
were i'll not be knowing the someIdAsString.
{
_id : ObjectId("someObjectId"),
test : {
someIdAsString : {
field1 : value1,
field2 : value2
},
someOtherIdAsString : {}
.....
.....
And so on
}
}
I have the field1 & field2 values how do i query the collection using this information.
field1 & field2 will be known at run time lets say it's field1 = '33' & field2 = '3333' and the document like
{
_id : ObjectId("522182515f8wea670900001b"),
test : {
522182515f8c4wd70900001b : {
field1 : '33',
field2 : '3333'
},
522182515f8cea670900001b : {}
.....
.....
And so on
}
}
Thanks