我的 MongoDB 测试数据库中有以下文档:
db.a.find()
{[ {
"_id" : ObjectId("5113d680732fb764c44qweq"),
"Builds" : [
{
"level" : 1,
"rank" : 2
},
{
"level" : 3,
"rank" : 4
}
],
"abs" : [
{
"level" : 3,
"status" : 5
},
{
"level" : 3,
"status" : 4
}
]
}, {
"_id" : ObjectId("5113d680732fb764c4464fdf"),
"Builds" : [
{
"level" : 3,
"rank" : 5
},
{
"level" : 3,
"rank" : 4
}
],
"abs" : [
{
"level" : 3,
"status" : 5
},
{
"level" : 3,
"status" : 4
}
]
}
]}
我需要找到 Builds level >=2 and <= 5 and abs status >=5 it like if(builds.leve >=2 && builds.level <= 5 && abs.status >=5 && abs.level>=2)多个条件,需要取值大小你能帮我吗?