【发布时间】:2018-06-02 21:46:21
【问题描述】:
我是 Mongo 的新手,我有收藏
{
"_id" : "297637",
"polygon" : {
"1" : {
"direction5" : {
"lat" : 40.73279100000004,
"lon" : -74.027161,
"delivery_fee" : NumberInt(300),
"delivery_estimate" : NumberInt(45),
"delivery_offered_to_diner_location" : false
}
}
}
}
我希望查询选择所有具有 _ID=297637 AND POLYGON=1 的文档 表示选择 POLYGON=1 内的所有“direction1”、“direction2”、“direction3”等行
我试过了
{ $and: [ { "_id": "297637" }, { "polygon": "1" } ] }
但它没有显示任何结果。
可能是因为polygon 和1 是Object 的类型还是什么?
【问题讨论】:
-
你能把你的文件贴在这里吗?
-
@mickl 添加.......
标签: mongodb mongodb-query