Here is what official docs said
updateIn(keyPath: Array, updater: (value: any) => any): List updateIn(keyPath: Array, notSe
You can use map:
map
list = list.map((item) => { return item.get("name") === "third" ? item.set("count", 4) : item; });
But this will iterate over the entire collection.