SET\_KEY
function to update a property of an existing item to a new value.SET_ITEM_AT(animals, 1, { name: "horse", weight: 600 })
[{"name":"dog","weight":123},{"name":"horse","weight":600},{"name":"rat","weight":10}]
SET_ITEM_AT(animals, 1, SET_KEY(item, "weight", 23))
[{"name":"dog","weight":123},{"name":"cat","weight":23},{"name":"rat","weight":10}]
SET_ITEM_AT(animals, -1, SET_KEY(item, "name", "horse"))
[{"name":"dog","weight":123},{"name":"cat","weight":48},{"name":"horse","weight":10}]
SET_ITEM_AT<product>(products, 0, SET_KEY(product, "price", product.price * 2))
[{"name":"Duct tape","price":5.8},{"name":"Swiss army knife","price":23},{"name":"Glue","price":1.5}]
SET_ITEM_AT<letter, position>(["a", "b", "c", "d", "e"], -2, UPPERCASE(letter) + "!")
["a","b","c","D!","e"]
SET_ITEM_AT(["a", "b"], 5, "c")
["a","b",null,null,null,"c"]