1var myObject = {
2 label: 'foo',
3 name: 'bar',
4 id: 12
5};
6
7myObject = {...myObject, label: 'baz', name: 'qux'};
8console.log(myObject);
9
10// Or, if your update is contained in its own object:
11
12var myUpdate = {
13 label: 'something',
14 name: 'else'
15}
16
17myObject = {...myObject, ...myUpdate}
18console.log(myObject)