const objects = []
let checkboxvalue = [{ name: '名字1' }, { name: '名字2' }]
let data = [{ value: '值1', id: 'id1' }, { value: '值2', id: 'id2' }]let arr = []
checkboxvalue.map((item, index) => {// data[index].name = item.namearr.unshift({ contractName: item.name, list: data[index] })
})
console.log(arr);
[
{contractName:'xxxxxx',
list:[ ]
},
{
contractName:'xxxxxx',
list:[ ]
},
]
二维数组对象制成表格
this.regularArr2 = ['', ...this.unitevertical1].map((v1, i1) =>['用人单位类型', ...this.uniterow1].map((v2, i2) => {if (!i1 && !i2) return '用人单位类型'if (!i1) return v2if (!i2) return v1})
)