N1ql array update query?

hi
I have a question.
The obstacle object key is uuid.

The following function is a function that can update the obstacle only one at a time.

Obstacle: Obstacle to obstacle_list: Array I want a function that can update only changed values ​​at once.

static update(user_uuid: string, obstacle: Obstacle): Promise<any> {
    return new Promise<any>((resolve: () => void, reject: (error_code: error.ERROR_CODE) => void) => {
        var query: string = util.format("update `game` use keys '%s_HOME' set obstacle_list[idx] = %s for idx : o in obstacle_list when o.uuid = '%s' end",
            user_uuid, JSON.stringify(obstacle), obstacle.uuid);
        couch_helper.query("game", query)
            .then((rows: Array<any>) => {
                resolve();
                return;
            })
            .catch((error_code: error.ERROR_CODE) => {
                return reject(error_code);
            });
    });
}

static update(user_uuid: string, obstacle_list: Array): Promise {
?? query
}

Following UPDATE every occurrence of “1” with “11”.

INSERT INTO DEFAULT VALUES ("k001",{"list":["1","2","3","1"]});
UPDATE default USE KEYS ["k001"] SET list[ARRAY_POS(list,idx)] = "11" FOR idx IN list WHEN idx = "1" END;
SELECT * FROM default USE KEYS ["k001"];

Also checkout UPDATE-FOR nested array updates https://developer.couchbase.com/documentation/server/current/n1ql/n1ql-language-reference/update.html