Answers for "mongodb remove key from document"

13

remove property mongodb

db.myCollection.update({}, {$unset: {fieldToRemove:1}} , {multi: true});
Posted by: Guest on May-25-2020
0

mongo delete a key in matching documents

db.collection_name.update({ _id: 1234 }, { $unset : { description : 1} })
Posted by: Guest on April-26-2021

Code answers related to "mongodb remove key from document"

Code answers related to "Javascript"

Browse Popular Code Answers by Language