When having the following document structure, can I use N1QL to do an Update on a subdocument to add en extra field?
> {
> "blog": "testblog1",
> "user_id": 41,
> "comments": [
> {
> "comment": "testcomment1",
> "user_id": 883
> },
> {
> "comment": "testcomment2",
> "user_id": 790
> }
> ]
> }
For example I would like to add the field “ranking” : “top comment” to the subdocument with the comment testcomment2:
> {
> "blog": "testblog1",
> "user_id": 41,
> "comments": [
> {
> "comment": "testcomment1",
> "user_id": 883
> },
> {
> "comment": "testcomment2",
> "user_id": 790,
> "ranking" : "top comment"
> }
> ]
> }