{
12341: {name: "john", surname: "melisa"}
};
let newUsers = Object.keys(users).reduce( (acc, key) => { const { name, ...userData} = users[key]; acc[key] = ({ newName: name, ...userData}); return acc; }, {} );
Обсуждают сегодня