remove property mongodb
db.myCollection.update({}, {$unset: {fieldToRemove:1}} , {multi: true});
remove property mongodb
db.myCollection.update({}, {$unset: {fieldToRemove:1}} , {multi: true});
mongodb aggregate remove field
{ $project: { "<field1>": 0, "<field2>": 0, ... } } // Return all but the specified fields
$removefromset mongodb
> db.collection.update(
... {"StudentName": "John"},
... {$pull: { "StudentHobby": "Cooking"}});
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us