从手册中我理解以下说明......
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'
});
答案 0 :(得分:1)
Person.find({or:[{name: 'Jack'}, {name: 'Jill'}]}, function(err, res) {
});
答案 1 :(得分:0)
这应该可以正常工作:
Person.find({ name: ["Jack", "Jill"] }, function (err, people) {
// finds all people with name='Jack' and name ='Jill'
});