How to join two JSON Array objects in Node
var output = obj1.concat(obj2);
obj1 = [ { t: 1, d: 'AAA', v: 'yes' },
{ t: 2, d: 'BBB', v: 'yes' }]
obj2 = [ { t: 3, d: 'CCC', v: 'yes' },
{ t: 4, d: 'DDD', v: 'yes' }]
var output = obj1.concat(obj2);
console.log(output);
try
Object.assign(obj1, obj2);
For Details check Here
var o1 = { a: 1 };
var o2 = { b: 2 };
var o3 = { c: 3 };
var obj = Object.assign(o1, o2, o3);
console.log(obj); // { a: 1, b: 2, c: 3 }