var list1 = [
{
title: '名称1',
age: '18'
},
{
title: '名称2',
age: '19'
},
{
title: '名称3',
age: '20'
},
{
title: '名称4',
age: '17'
}
]
var list2 = [
{sex: '男'},
{sex: '女'},
{sex: '女'},
{sex: '男'}
]
var list = list1.map((item,index) => {
return {...item,...list2[index]}
})
console.log("list",list);
07-22
254
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-17