I have an indexed list of users in the JS object (not array). It\'s part of the React state.
users
{ 1: { id: 1, name: \"John\" } 2: { id: 2, name
This is what i would do
var newUsers = _.extend({}, users, { 4: { id: 4, ... } })
var newUsers = _.extend({}, users)
delete newUsers['2']
newUsers['2'].name = 'Peter'