How to update field in array with N1QL

INSERT INTO default VALUES ("k001", { "host1": { "instances": [ { "capacity": { "change": { "rps": 0, "rt": 1000 }, "max_connections": 0, "read": { "rps": 0, "rt": 500 } }, "conn_string": "local", "state": "disabled" } ], "quotas": { "activities": { "redirect": { "change": 100, "read": 100 }, "lost": { "change": 0, "read": 1 } }, "users": { "default": { "change": 0, "max_connections": 0, "read": 0 }, "admin": { "change": 0, "max_connections": 1, "read": 1 } } } }, "host2": { "instances": [ { "capacity": { "change": { "rps": 0, "rt": 1000 }, "max_connections": 0, "read": { "rps": 0, "rt": 500 } }, "conn_string": "local", "state": "disabled" } ], "quotas": { "activities": { "redirect": { "change": 100, "read": 100 }, "lost": { "change": 0, "read": 1 } }, "users": { "default": { "change": 0, "max_connections": 0, "read": 0 }, "admin": { "change": 0, "max_connections": 1, "read": 1 } } } } });

UPDATE default AS r USE KEYS "k001"
SET opi.state = "enabled" FOR opi IN r.[op].instances FOR op IN OBJECT_NAMES(r)
                          WHEN op IN ["host1", "host2"] AND opi.state = "disabled" END
WHERE ANY op IN OBJECT_PAIRS(r)
      SATISFIES op.name IN ["host1", "host2"]
                AND (ANY opi IN op.val.instances
                     SATISFIES opi.state = "disabled"
                     END)
      END;