I have collection with a document structure that looks like this:
{
id : 1,
name : "height",
datasets : [
{
version : 1.1,
data : [{x: 0, y: 1}, {x: 1, y: 2}]
}
]
}
I want to push another object {x: 2, y: 3}
to the 'data' array of an object in 'datasets' where 'version' is 1.1.
I've tried multiple combinations but I don't seem to get the right one.
How can this be achieved?
Thanks