Recursively copies all values from one object to another, overwriting properties that collide.

xtag.merge(IMPORTING_OBJECT, EXPORTING_OBJECT)

ArgumentsTypeDescription
IMPORTING_OBJECTObjectThe object that is having properties merged into it from the exporting object
EXPORTING_OBJECTObjectThe 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 }