Answers for "mongodb set object property in array"

0

mongodb set object property in array

{  _id: 4,  grades: [     { grade: 80, mean: 75, std: 8 },     { grade: 85, mean: 90, std: 5 },     { grade: 85, mean: 85, std: 8 }  ]}
Posted by: Guest on August-28-2021
0

mongodb set object property in array

db.students.updateOne(   { _id: 4, "grades.grade": 85 },   { $set: { "grades.$.std" : 6 } })
Posted by: Guest on August-28-2021

Code answers related to "mongodb set object property in array"

Browse Popular Code Answers by Language