JS 把对象数组合并为一个对象
Object.assign 函数
var arr = [{name: 'AAA'},{age: '999'}]; var obj = {}; arr.map(x => Object.assign(obj, x)); // {"name":"AAA","age":"999"}
var arr = [{name: 'AAA'},{age: '999'}]; var obj = {}; arr.map(x => Object.assign(obj, x)); // {"name":"AAA","age":"999"}