I have a document in a Mongo collection which looks something like this:
{
_id: [uuid]
prop:
some: "text",
subprop: ['foo', 'bar']
}
I'd like to avoid having to pull the whole record out, modify it and push it back if that's possible. What update can I run to have 'bar' removed from doc.prop.subprop, not knowing the index it's stored at?
Thanks :)
$pulldo this:db.col.update({}, {$pull:{'prop.subprop': 'bar'}})?