Answers for "how to update subdocument mongodb"

0

how to update subdocument mongodb

db.getCollection('products')
.update({"reviews.user": ObjectId("5f6e2e0b70eb0208fc8401a1")}, 
{$set: {"reviews.$.rating": NumberInt(3)}})
Posted by: Guest on September-26-2020

Code answers related to "how to update subdocument mongodb"

Browse Popular Code Answers by Language