1
我目前在我的平均應用程序中使用查詢時很困難。平均應用程序 - 不能在我的查找請求中使用查詢
詳細,我想獲得在搜索字段中的數據匹配,輸入:
$scope.searchInput = function(search){
$http({
method: 'GET',
url: '/search',
params: {'licensor.name' : search}
})
.success(
function(success){
console.log(success)
})
.error(
function(error){
console.log(error)
});
}
在服務器端,我的代碼看起來是這樣的:
app.get('/search', function(req,res){
ImportCollection.find(function(err, imports){
if(err) throw err
res.json(imports)
});
});
此八方通返回完整的集合。 任何想法?
作品!非常感謝! 你有什麼想法如何查詢嵌套對象?這隻適用於第一級參數。 – Pascal
db.messages.find({'ImportCollection.value_1':「[email protected]」}) 我希望你能理解格式。 –