mongodb查询问题
mongodb吧
全部回复
仅看楼主
level 1
醉舞蓝颜
楼主
大侠们,如果key的值是一个object对象,比如 :
{
"_id" : ObjectId("58a3dfd8528434f440a9e8e0"),
"create_at" : ISODate("2017-02-15T04:58:00.309Z"),
"des" : "示例",
"a" : {
"b" : {
"c" : "hello world",
},
}
}
我要怎么通过a模糊查找“hello”,能查出该条数据呢?
2017年02月16日 03点02分
1
level 1
liker998
应该使用{"a.b.c":/hello/}会可以查到
可以参考:
http://forum.foxera.com/mongodb/topic/208/mongodb-%E6%96%87%E6%A1%A3%E6%9F%A5%E8%AF%A2?YL=q
2017年02月17日 02点02分
2
1