Hi,
I am using Java SDK 2.2.8 SubDoc API.
I am in need to remove elements from a array and have tried to remove using index. (mutateIn().remove());
Using N1QL can the elements be removed more efficiently? If yes, please provide a sample query.
Thanks Frank.
If my document is nested and the array is present at a different level, how do we mention the path in the update query. I am using the N1QL mentioned here Removing elements in a JsonArray
SELECT ARRAY_REMOVE(root_path.level_1.level_2.contents, { “field1”:“value1”, “field2”:“value2”, “field3”:“value3”}) FROM default WHERE …