我有一个文件,
{
"_id" : ObjectId("5bc864fe3cbb0d393687120b"),
"eStatus" : "y",
"aQuestions" : [
{
"eStatus" : "y",
"_id" : ObjectId("5bcd7818f0903a1c82aeef85"),
"sQuestion" : "aabbccdd?",
},
{
"eStatus" : "n",
"_id" : ObjectId("5bcda6aac272142b96ba77c3"),
"sQuestion" : "sdfdsf",
},
{
"eStatus" : "y",
"_id" : ObjectId("5bcda6bfc272142b96ba77c6"),
"sQuestion" : "vnmhjk",
},
{
"eStatus" : "n",
"_id" : ObjectId("5bd69f7516972c11234a3613"),
"sQuestion" : "What is use of Wallet in ParadiseXtrade ?",
}
],
}
我的查询:helpFaqsModel.findOne({_id: req.body._id,aQuestions: {$elemMatch: {eStatus: "y"}}})
我不确定找到eStatus: "y"
我想从该集合以及具有eStatus:"y"