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]”}) 我希望你能理解格式。 –