My data looks some like
"rating_score_detail":[
{
"star_value":5,
"number_of_ratings":34
},
{
"star_value":4,
"number_of_ratings":2
},
{
"star_value":3,
"number_of_ratings":0
},
{
"star_value":2,
"number_of_ratings":0
},
{
"star_value":1,
"number_of_ratings":1
}
]
Which is basically an array of objects
I want to have a mongodb query so that I can edit a single element for example rating_score_detail [0] the element, key : number_of_ratings.
How can I be able to do this?