Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 MongoDB 查询投影作者的名字
{ name: "Wings Of Fire", author: { first: "Abdul", last: "Kalam" } }
您可以在字段选择器中使用点表示法来投影子文档字段。在外壳中:
db.test.find({}, {'author.first': 1})