【发布时间】:2018-02-20 03:42:56
【问题描述】:
我的一个集合中有一个嵌套数组,如下所示,
如何从特定子数组中检索值&我不需要该文档中的任何其他字段。 我尝试使用以下查询,但没有得到预期的输出,
查询:
db.getCollection('my_collection').find({"_id":"08d4608a-e6c4-1bd8-80e6-8d1ac448c34b"},{"_id":0,"customProperties.0.1":1})
【问题讨论】:
标签: mongodb python-2.7 pymongo