Reputation: 328
I have a collection called student, now I want to update the object value inside array based on condition. Can anyone help me to figure this logic please.
Student:
{
_id: "5996d10e0b992e5def651db4"
name: "Siva"
mark:[
{subject:"Tamil",mark:"50"},
{subject:"English",mark:"25"},
{subject:"Science",mark:"25"},
]
__v: 36
}
Expected Result: I want to update only Tamil mark by checking the subject value...
Upvotes: 0
Views: 31