way to change the objects propertys name without creating a new object list? i have limited memory, so i cant simply do list.map(o => ({new1: o.prop1, new2: o.prop2...}))
for (let i = 0; i < list.length; i++) { list[i].new2 = ...; delete list[i].new1; }
Logically same as mine, but this might convey intent slightly better
lol
Обсуждают сегодня