我试图在C驱动程序中寻找类似于以下内容的方法: https://docs.mongodb.com/manual/reference/operator/query/elemMatch/#op._S_elemMatch
在这个帖子中回答:
Query for a field in an object in array with Mongo?
我有这个json,我想检查sessions.id = 1234556的值:
{
"_id": ObjectId("5768e43"),
"APPID": {
"Number": 0,
},
sessions: [
{
id:1234556,
"setOID": {
"Number": 0
},
"custID": {
"Number": 0
},
},
{
id:133333,
"setOID": {
"Number": 2
},
"custID": {
"Number": 2
},
},
]
}
如何在新的C驱动程序中完成?