Answer the question
In order to leave comments, you need to log in
How to perform OR predicate in query in ODM mongoose.js?
Hello. Studied the query API (find, query, findOne) in the mongoose module provided for Node.js. And I didn’t understand if there is support for the OR predicate in the query, and how is it correctly implemented? Thanks for the clarification and good examples.
Answer the question
In order to leave comments, you need to log in
Mongoose API Docs
like this -
or so -
Model
.find({})
.where('name').in(['one', 'another'])
.exec(function(err, result){})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question