let objArr = [
{ id: 1, name: "xiaoming" },
{ id: 2, name: "xiaohong" },
{ id: 3, name: "xiaolan" }
];
let sex = ["男", "女", "男"];
sex.forEach((item, index) => {
objArr =Object.assign({}, { sex: item });
});
console.log(objArr, "obj");
11-17
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-10