Sign up to request clarification or add additional context in comments.
Comments
-1
Here's just one solution like you need:
let a = {
0: [{}, {}],
1: [{}, {}],
2: [{}]
}
let values = []
for (var x in a)
{
a[x].map(p => values.push(p))
}
console.log(values) //[{}, {}, {}, {}, {}]
Make sure to handle each case, validate if it's an array then loop over it.
Array.