I have a collection with documents like below:
{
title: "whatever",
answers: [
{id: 10, question: ObjectId("54380350a52147000aad4e9b")},
{id: 13, question: ObjectId("54380350a52147000aad4e9c")},
{id: 33}
]
}
I'm have attempted to unset the question attribute using the commands below:
db.participants.update({}, {$unset: {"answers.question": ""}}, {upsert: false, multi:true} )
and
db.participants.update({}, {$unset: {"answers.question": 1}}, {upsert: false, multi:true} )
Both of these spit out: WriteResult({ "nMatched" : 628795, "nUpserted" : 0, "nModified" : 0 }) when completed, but no documents are updated (as the message suggests). Any idea why my update isn't working?