let arr = [{ id: 123, name: "666" }]; let res = arr((obj, item) => { obj[item.id] = item.name; return obj; }, {});
結果👆