📜  对象数组中的数组 - Javascript 代码示例

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

代码示例1
var response = {data: [{users: [1,2,3]}, {users: [4,5,6]}]}

var users = response.data.map(o => o.users)

const usersCollection = [].concat(...users)

console.log(usersCollection)