0

从手册中,我了解以下说明...

Person.find({ name: "Jack" }, function (err, people) {
// finds people with name='Jack'
});

我想找两个人,“杰克”和“吉尔”。这显然是不正确的,但类似...

Person.find({ name: "Jack" AND name: "Jill" }, function (err, people) {
// finds all people with name='Jack' and name ='Jill' 
});
4

2 回答 2

1
Person.find({or:[{name: 'Jack'}, {name: 'Jill'}]}, function(err, res) {

});
于 2016-01-25T15:42:12.030 回答
0

这应该可以正常工作:

Person.find({ name: ["Jack", "Jill"] }, function (err, people) {
    // finds all people with name='Jack' and name ='Jill' 
});
于 2016-12-23T19:09:53.687 回答