Answers for "arrays inside array of objects"

0

arrays inside array of objects

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)
Posted by: Guest on August-07-2020

Code answers related to "arrays inside array of objects"

Code answers related to "Javascript"

Browse Popular Code Answers by Language