Suppose you have documents like this:
{
_id: 'sdsdfsd',
a: [
{ x: 0, y: 0, z: 0 }
{ x: 0, y: 0, z: 0 }
{ x: 0, y: 0, z: 0 }
{ x: 0, y: 0, z: 0 }
]
}
So, if you have the _id and an index number (say: 2). Now, for that index I want to change the x value to 1. Is this possible in mongo or should I first retrieve the whole array, update the specific value and update the whole array by inserting it back ?