Some document contain a field, others do not.
What should I do to remove a field from all document under a collection?
mongo shell
db.foo.update({}, {$unset: {bar: true}}, {multi: true});
Some document contain a field, others do not.
What should I do to remove a field from all document under a collection?
mongo shell
db.foo.update({}, {$unset: {bar: true}}, {multi: true});