UPDATE SET FOR IN WHEN END chain

Thanks vsr1, here is the truncated form of the “hotel_10063” doc in the standard travel-sample bucket after I successfully ran the first UPDATE statement, which inserted the attribute “aaa” array of objects to the second object under the “reviews” array.

I am trying to change the string value of the “bbb” attribute located in the second object in the “aaa” array where the “id” attribute equals “b2”. I am having a hard time following the very last example on the link I originally posted that you pointed out – for my query to work, do I have to create a new index? I originally did not think I would because the FOR chain is not in the predicate…

{
  "address": "6 rue aux Juifs",
  "alias": "Les Rouges Gorges",
  ...
  "price": "60 / 70 euros",
  "public_likes": [],
  "reviews": [
    {
      "author": "Blaise O'Connell IV",
      "content": "Staff need a bit ...",
      "date": "2015-12-02 09:11:19 +0300",
      "ratings": {
        "Cleanliness": 3,
        "Overall": 3,
        "Rooms": 3,
        "Service": 1,
        "Value": 3
      }
    },
    {
      "aaa": [
        {
          "bbb": "_21",
          "id": "a1"
        },
        {
          "bbb": "_22",
          "id": "b2"
        },
        {
          "bbb": "_23",
          "id": "c3"
        }
      ],
      "author": "Nedra Cronin",
      "content": "We ended up choosing the Holiday Inn because ...",
      "date": "2012-01-14 02:15:51 +0300",
      "ratings": {
        "Overall": 4
      }
    },
    {
      "author": "Marianna Schmeler",
      "content": "I must explain this history in order that ...",
      "date": "2015-11-29 16:27:44 +0300",
      "ratings": {
        "Cleanliness": 3,
        "Location": 1,
        "Overall": 4,
        "Rooms": 3,
        "Service": 5,
        "Sleep Quality": 3,
        "Value": 4
      }
    },
    ...
  ],
  "state": "Haute-Normandie",
  "title": "Giverny",
  "tollfree": null,
  "type": "hotel",
  "url": "http://givernyguesthouse.com/robin.htm",
  "vacancy": true
}