Check out the structure of my JSON response:
"_id" : 537,
"quizzes" : [
{
"wk" : 1,
"score" : [
10
]
},
{
"wk" : 2,
"score" : [
8
]
},
{
"wk" : 3,
"score" : [
5
]
},
{
"wk" : 4,
"score" : [
6
]
}
]
}
I'm attempting to make changes to the score array within one of the objects. Take a look at what I've done:
db.collection('connect').update({_id: id}, {$push: { quizzes[0]: { score: 89 } }});