Simple, self-explanatory code snippets.
db.collection_name.updateOne(
{"array_of_docs.field_name": {$exists: 1}},
{$unset: {"array_of_docs.$[].field_name": ""}}
);
No comments:
Post a Comment