比如
var a = db.collection.find();
var b = [];
a.forEach(item=> {
if (item.name == 1)
b.push(item)
});
b;
有一个处理比较复杂的语句代码段,mongoose怎么传递这段代码段到mongoodb?
阿神2017-04-17 15:26:22
What is your intention? Looking at your code, you only need to process it in the callback after querying the value