db.collection_name.update(
{
"field_to_filter_by": "abc"
},
{$set: {
"parent
.objectsArray1
.$[elemOfObjectsArray1]
.objectsArray1
.$[elemOfObjectsArray2]
.field_to_change": "the new value"
}},
{
multi: true,
upsert: false,
arrayFilters: [
{"elemOfObjectsArray1.filter_field_1": "def"},
{"elemOfObjectsArray2.filter_field_2": "ghi"},
]
}
);
No comments:
Post a Comment