try..
db.mycollection.update(
{ '_id': ObjectId("5150a1199fac0e6910000002") },
{ $pull: { items: { id: 23 } } },
false, // Upsert
true, // Multi
);
More Related Contents:
- Updating a Nested Array with MongoDB
- Mongoose and multiple database in single node.js project
- How do I update/upsert a document in Mongoose?
- How to search in array of object in mongodb
- Mongoose find/update subdocument
- Mongoose, Select a specific field with find
- How to sort in mongoose?
- Mongoose difference between .save() and using update()
- Bulk upsert in MongoDB using mongoose
- UnhandledPromiseRejectionWarning: MongooseServerSelectionError
- MongoDB select where in array of _id?
- Mongoose subdocuments vs nested schema
- Why is an _id with ObjectID added to when using MongoDB’s $push to add new object to an array?
- How to set _id to db document in Mongoose?
- What is a TransientTransactionError in Mongoose (or MongoDB)?
- Mongoose.js: Find user by username LIKE value
- Server Discovery And Monitoring engine is deprecated
- Mongoose Not Creating Indexes
- is there a mongoose connect error callback
- MongooseServerSelectionError: connect ECONNREFUSED ::1:27017
- Node.js mongodb driver async/await queries
- Find after populate mongoose
- What is the difference between id and _id in mongoose?
- JavaScript NoSQL Injection prevention in MongoDB
- Group by Date with Local Time Zone in MongoDB
- MongooseError: Model.findOne() no longer accepts a callback at Function
- Mongoose find() not returning result
- How to get updated document back from the findOneAndUpdate method?
- Why can’t I delete a mongoose model’s object properties?
- MissingSchemaError: Schema hasn’t been registered for model “User”