Skip to content
Advertisement

Concatenate Object values

I have a JavaScript Object and I’m sure the value of any key is an array (even empty in some case):

JavaScript

Aside from using Underscore, is there any way to concatenate all the values of this Object (and create a new array)?

At the moment I get the keys name using Object.keys, then I loop and concatenate.

Any help is appreciated.

Advertisement

Answer

JavaScript
Advertisement