這裏是我的文檔:蒙戈搜索嵌套數組鍵的值
"_id" : "dAWcFHJzDPJ2XT9Sh",
"createdAt" : ISODate("2016-04-22T18:03:47.761Z"),
"services" : {
"password" : {
"bcrypt" : "$2a$10$NYf53o/Uu8PvHPsGllRGA.WLbVpspNM4jk/6FtCzZLW.70.uQ2HXe"
},
"resume" : {
"loginTokens" : [
{
"when" : ISODate("2016-04-22T18:03:47.771Z"),
"hashedToken" : "dECxxuV/QyU2AU+/Zcrqc2Ftq64ZTrdHj5mN/rTGrxU="
}
]
}
},
"emails" : [
{
"address" : "[email protected]",
"verified" : false
}
],
"profile" : {
"first_name" : "Adam",
"last_name" : "Moisa"
}
我想在電子郵件[I]地址
搜索電子郵件這就是我已經試過(我。使用流星; Meteor.users.find({})fetch()方法返回數據庫中的所有用戶作爲對象格式化像上面):
Meteor.users.find({"emails[0]address": "Adam"}).fetch();
我想,要返回上述目的爲「亞當」是一個電子郵件在電子郵件[0]地址
謝謝!