📌  相关文章
📜  js 对象数组从所有对象中获取特定键 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:14.441000             🧑  作者: Mango

代码示例1
let users = [
  {
    name: 'John',
    age: 20,
  },
  {
    name: 'Richard',
    age: 25,
  }
];

let names = users.map(user => user.name);

// ['John', 'Richard]