I have a collection named MeasureData and try to find a specific document.
I’m trying to do this on studio 3T by the way.
The document looks like
{
"_id" : "gETGXui6YhHknQXgr",
"createdAt" : ISODate("2022-05-05T14:41:58.567+0000"),
"value" : "1",
"measureId" : "JcZ23X5nbBMoJmRrk",
"creatorDetails" : {
"uuid" : "wD7BaeY6SsNSBgjbg",
"responseId" : "xzPAXsFqFXb9DNwWN"
},
"updatedAt" : ISODate("2022-05-05T14:41:58.569+0000"),
"valueMeta" : {
},
"sample" : false,
"createdAtMeta" : {
"year" : NumberInt(2022),
"month" : NumberInt(4),
"day" : NumberInt(5)
}
}
I would like to filter by only measureId and creatorDetails.uuid but this below doesn’t filter the document.
db.getCollection("MeasureData").find({
"creatorDetails" : {
"uuid" : "wD7BaeY6SsNSBgjbg",
},
"measureId": "JcZ23X5nbBMoJmRrk",
})
And I found out if I added “responseId”, it worked.
db.getCollection("MeasureData").find({
"creatorDetails" : {
"uuid" : "wD7BaeY6SsNSBgjbg",
"responseId" : "xzPAXsFqFXb9DNwWN" // added
},
"measureId": "JcZ23X5nbBMoJmRrk",
})
Do I have to have a creatorDetails.responseId query all the time to filter above document?
Thank you!