I have a Mongo DB with the following object:
"clients" : {
"x" : {
"clientId" : "x1",
"mainInfo" : {
...
},
"events" :
{
"58a176bbc3588410cd5450c6" : {
"clientType" : "5001",
"location" : "60001"
}
"58a176bbc3588410cd5450c8" : {
"clientType" : "5001",
"location" : "60002"
}
....}
I cannot seem to figure out how to query where 'clients.x.events.(variable id).clientType' = 50001. Is there a way to drill down inside the events embedded object to get all records matching "clientType" : "5001"?
Thank you