JavaScript actualiza múltiples valores de un objeto
var myObject = {
label: 'foo',
name: 'bar',
id: 12
};
myObject = {...myObject, label: 'baz', name: 'qux'};
console.log(myObject);
// Or, if your update is contained in its own object:
var myUpdate = {
label: 'something',
name: 'else'
}
myObject = {...myObject, ...myUpdate}
console.log(myObject)
Lazy Louse