How to remove 'name' property? Tried chaining update with find but no luck, the syntax is not allowed.
when I run db.getCollection('myCollection').find({"key":"person"})
I got this
{
"key" : "person",
"value" : [
{
id: 1
"name" : "james",
},
{
id: 2
"name" : "john",
},
]
}
Why this won't work? db.getCollection('myCollection').find({"key":"person"}).update({}, {$unset: {name:1}}, {multi: true});