const orgList = [
{name: '张三',age:20},
{name: '李四',age:18},
{name: '王五',age:26},
{name: '赵六',age:21}
]
const arr = orgList.map((o)=>{
return o.name;
})
js 获取数组对象中某属性组成新数组
![](https://img-home.csdnimg.cn/images/20240711042549.png)
const orgList = [
{name: '张三',age:20},
{name: '李四',age:18},
{name: '王五',age:26},
{name: '赵六',age:21}
]
const arr = orgList.map((o)=>{
return o.name;
})