Easy 🙂
db.collection.find( { _id : { $in : [1,2,3,4] } } );
taken from: https://www.mongodb.com/docs/manual/reference/operator/query/in/#mongodb-query-op.-in
More Related Contents:
- How to search in array of object in mongodb
- How to properly reuse connection to Mongodb across NodeJs application and modules
- MongoDB, remove object from array
- Render basic HTML view?
- How do I remove documents using Node.js Mongoose?
- UnhandledPromiseRejectionWarning: MongooseServerSelectionError
- How to get updated document back from the findOneAndUpdate method?
- Can I determine if a string is a MongoDB ObjectID?
- Handlebars: Access has been denied to resolve the property “from” because it is not an “own property” of its parent
- How do I query referenced objects in MongoDB?
- SyntaxError: Unexpected token function – Async Await Nodejs
- How do you send images to node js with Axios?
- Mongoose difference between .save() and using update()
- Why cant I inline call to res.json?
- When to close MongoDB database connection in Nodejs
- How to exclude some fields from the document
- How to disable Express BodyParser for file uploads (Node.js)
- Why is an _id with ObjectID added to when using MongoDB’s $push to add new object to an array?
- What is a TransientTransactionError in Mongoose (or MongoDB)?
- Mongoose.js: Find user by username LIKE value
- How to get data passed from a form in Express (Node.js)
- how express forming the img URL
- How do I stream response in express?
- Node.js mongodb driver async/await queries
- Using Express Handlebars and Angular JS
- What does “res.render” do, and what does the html file look like?
- How to decipher string in node js which is encrypted in crypto js in javascript
- how to use jQuery installed with npm in Express app?
- Group by Date with Local Time Zone in MongoDB
- How can I easily get access to form data in Express js?