0
我有有每個用戶播放[MongoDB的]獲取文件,如果值列表是路口
User = new mongoose.schema(){
// skiped stuff
instruments: [String]
// more skipped stuff
}
我路徑功能需要在文書清單intruments的列表中的用戶文檔,我希望所有的文檔,其中用戶起到輸入工具列表中的任何儀器
我一直在嘗試使用
{instruments:{
$elemMatch: {
$in: inputInstrumentList // thought something like this would work :/
}
}
不過,這只是給我的錯誤
任何和所有先發制人感謝幫助
嘗試'User.find({「樂器」:{「$的」: inputInstrumentList}})。exec(回調)' – chridam