JavaScript扩展(合并)Object
使用Object.assgin(ObjToExpand, ObjWithNewData)
var obj1 = {
a:1,
b:2
};
var obj2 = {
c:3,
d:4
};
Object.assign(obj1,obj2);
console.log('obj1',obj1); //{a: 1, b: 2, c: 3, d: 4}
console.log('obj2',obj2); //{c: 3, d: 4}