在我的meteor.js應用程序中,我試圖編寫一個簡單的管理頁面,可以通過他/她的電子郵件地址找到用戶。meteor.js:通過電子郵件找到用戶
我可以看到Meteor.users集合中有一個「郵件」陣列,其中有像這樣
{ address : '[email protected]',
verified : false
}
通常在MongoDB中我可以在這個「電子郵件」數組內搜索,像這樣的對象:
Meteor.users.find({ emails.address : '[email protected]' });
但這查詢拋出一個錯誤:
While building the application:
client/admin.js:224:41: Unexpected token .
又名流星不喜歡NE sted query ...
有關如何通過電子郵件地址查詢Meteor.users集合的任何想法?
的感謝!這工作完美。奇怪的文檔明確表示$ elemMatch不在客戶端上可用... – Petrov