如何在mongoose中查询数组[对象]结构?

时间:2017-03-13 07:47:33

标签: node.js mongodb

我有数组[object] schema:

var operation = new Schema({
    name:{type:String},
    number:[Number],
});

var Info = new Schema({
    operation:[operation],
}); 

当operation.name =' jack';

如何通过Info Schema查询条件?

 Info.findOne({
    condition
 },function(e,r){

 });

0 个答案:

没有答案