Hi there.
I have set of documents with following structure:
{ "someData" : "someValue", "val" : "a", "nested" : [ { "name" : "row1", "value" : "a" }, { "name" : "row2", "value" : "b" } ] }
How would I write UPDATE statement, so “nested” would remain only rows where “nested.value = val”?
In this case after and update statement I would like to have this result:
{ "someData" : "someValue", "val" : "a", "nested" : [ { "name" : "row1", "value" : "a" } ] }
PS rows are not sorted, so I need a generic solution of removing row from nested collection.
Unfortunately none of the following links helped me:
Thanks.