Using N1ql to update/replace an array element

You can use the following for now, which is equivalent. I am still troubleshooting the other syntax. Sorry about that.

UPDATE default d
SET sc.subsubcategories = ARRAY CASE WHEN ssc._id = "5" THEN {} ELSE ssc END FOR ssc IN sc.subsubcategories END FOR sc IN subcategories WHEN sc._id = "1" END
WHERE _type = "Category"
RETURNING d.*;