Mongoose结果项目计数
我如何在find的结果中获得数组计数,例如Mongoose结果项目计数,mongoose,count,Mongoose,Count,我如何在find的结果中获得数组计数,例如 Person.find({'exployment.office':'Greenway'}) .exec(function(err, result){ //number of items in result }); //how can I get the array of result which is number of items in the result. 你是说resu
Person.find({'exployment.office':'Greenway'})
.exec(function(err, result){
//number of items in result
});
//how can I get the array of result which is number of items in the result.
你是说
result.length
?这就是我要找的。谢谢