js对象数组赋值或者新增新对象 张闻闻 2023-04-19 170 阅读1分钟 给数组里的对象进行赋值,如果不存在就添加新的数据对象 var model = [] //newData是新的对象数组 model = Object.assign({}, model ,newData.data)