mongosb how to change all fields inside array code example
Example: mongodb replace item in array
db.movies.updateMany(
{ "languages": "French" },
{ "$set": { "languages.$": "Francais" } }
)
db.movies.updateMany(
{ "languages": "French" },
{ "$set": { "languages.$": "Francais" } }
)