I have a javascript object with several keys whose values are arrays of objects. I am trying to combine all key/values into a single array of objects. So from
{
a: [{}, {}, {}],
b: [{}, {}, {}],
c: [{}, {}, {}]
}
To
[{}, {}, {}, {}, {}, ...]
I am trying something like
Object.keys(myObject).map(key => myObject[key])
Which results in an array with 3 arrays inside.
I have also tried using using lodash and doing
Object.keys(myObject).map(key => _.values(myObject[key]))
Which seems to result in the same thing. How can I properly do this? Preferably in a single line like I am attempting instead of a loop. Sorry if this is asked already, I don't know how to word the question to find a result