Recursively copies all values from one object to another, overwriting properties that collide.
xtag.merge(IMPORTING_OBJECT, EXPORTING_OBJECT)
xtag.merge(IMPORTING_OBJECT, EXPORTING_OBJECT)| Arguments | Type | Description |
|---|---|---|
| IMPORTING_OBJECT | Object | The object that is having properties merged into it from the exporting object |
| EXPORTING_OBJECT | Object | The object whose keys and values are being recursively added to the importing object. |
var foo = { one: 1, two: { value: 2 } };
var bar = { two: { value: 'two' }, three: 3 };
xtag.merge(foo, bar); // returns { one: 1, two: { value: 'two' }, three: 3 }
