SyntaxFix
Write A Post
Hire A Developer
Questions
In Mongoose, we can update array value using $set inside dot(.) notation to specific value in following way
$set
.
db.collection.update({"_id": args._id, "viewData._id": widgetId}, {$set: {"viewData.$.widgetData": widgetDoc.widgetData}})