JS对象合并方法
let obj1={
department:'编号',
title:'题名',
};
let obj2={
deveId:'1385118536590883515',
};
//方法一:利用扩展运算符
let obj3={...obj1,...obj2};
console.log(obj3);
//方法二:利用ES6 Object新增assign方法
let obj4=Object.assign({},obj1,obj2);
console.log(obj4);
本文来自博客园,作者:小基狠努力啊,转载请注明原文链接:https://www.cnblogs.com/ylh188/p/16017003.html