mongodb javascript replace element in 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" } }
)