Array Operation

Hi,
I am having trouble getting values from array and updating it. This is how my json looks like this:

[
  {
    "pmc": {
      "gpc_id": "product_ed_1_3",
      "ios": [
        {
          "authLvl": "AuthLvl_3",
          "deviceTyp": "DeviceTyp_3",
          "formFctr": "FormFctr_3",
          "ioCode": "IoCode_3",
          "ioColor": "IOColor_3",
          "ioIsDflt": "IoIsDflt_3",
          "ioLCI": "IoLCI_3",
          "io_attribute1": "e8035976-d801-4708-a389-84ec459abc35",
          "issExpDur": "IssExpDur_3",
          "objectType": "io",
          "pcn_id": "pcn_0"
        },
        {
          "authLvl": "AuthLvl_3",
          "deviceTyp": "DeviceTyp_3",
          "formFctr": "FormFctr_3",
          "ioCode": "IoCode_3",
          "ioColor": "IOColor_3",
          "ioIsDflt": "IoIsDflt_3",
          "ioLCI": "IoLCI_3",
          "io_attribute1": "e8035976-d801-4708-a389-84ec459abc35",
          "issExpDur": "IssExpDur_3",
          "objectType": "io",
          "pcn_id": "pcn_1"
        },
        {
          "authLvl": "AuthLvl_3",
          "deviceTyp": "DeviceTyp_3",
          "formFctr": "FormFctr_3",
          "ioCode": "IoCode_3",
          "ioColor": "IOColor_3",
          "ioIsDflt": "IoIsDflt_3",
          "ioLCI": "IoLCI_3",
          "io_attribute1": "b9f2cf1c-e57c-4164-a656-48bc2a73f5ff",
          "issExpDur": "IssExpDur_3",
          "objectType": "io",
          "pcn_id": "pcn_2"
        }
      ],
      "javaClass": "com.test.embeddedDocuments.vo.Product",
      "objectType": "product",
      "platform_id": "Platform_id_3",
      "prdCd": "PrdCd_3",
      "prdEffTS": 1523949746535,
      "prdEndTS": 1523949746535,
      "prdTyp_id": "PrdTyp_id_3",
      "primaryCard": "primaryCard_3",
      "product_attribute1": "744f8d27-47a1-44b5-a7ef-c02364041af0",
      "secondaryCard": "secondaryCard_3"
    }
  }
]

There are two N1QL’s that I am having trouble with:

  1. How to get the list of all io_attribute1 across the array (3 items should be returned)

  2. If I need to update just the io_attribute1 to “1” if the value is “e8035976-d801-4708-a389-84ec459abc35”(it should update two attributes)

SELECT  ARRAY v.io_attribute1  FOR v IN pmc.ios END  AS io_attributes  FROM pmc WHERE .....

UPDATE pmc SET v.io_attribute1 = "1"
        FOR v IN ios  WHEN v.io_attribute1 = "e8035976-d801-4708-a389-84ec459abc35" END
 WHERE .......  
                 ANY  v1 IN ios SATISFIES v1.io_attribute1 = "e8035976-d801-4708-a389-84ec459abc35" END;

Actual update value decided by FOR in the SET clause.
ANY clause in WHERE discards the documents that don’t qualify without that document qualify for update but it may not update (it is based on SET clause condition)