Update document which contains Array of object

Hi All,

Here is my document
{
“sypes”: [
“TEST_1”,
“TEST_2”
],
“isDeleted”: false,
“countryCode”: “GB”
}

I want to update TEST_2 attribute . instead of TEST_2 i want to update TEST_3.

Please suggest query .

UPDATE default d
SET  d.sypes[pos] = "TEST_3" FOR pos:v IN d.sypes WHEN v =  "TEST_2" END
WHERE ANY v IN d.sypes SATISFIES v = "TEST_2" END;

Thanks For your support . It worked for me .