Combining arbitrary number of lists inside json
First

but without forEach not able to return a value i'm struggling for a succinct solution.

Addressing this in your post, in the future it may help to know you can use the .map() function, which does return values to an array, unlike forEach()
an example using .map() and what you have:


const config = {"levels": {"first": ["a", "b", "c"], "second": ["d", "e", "f"]}};
const accessor = config.levels

let combine = Object.keys(accessor).map(key=&gt;{return accessor[key]});
let levels = [].concat.apply([], combine);

console.log(levels);
// levels == ["a", "b", "c", "d", "e", "f"]



More Succinct Solution
That said, something like this may be what you're looking for:


const config = {"levels": {"first": ["a", "b", "c"], "second": ["d", "e", "f"]}};
const accessor = config.levels

const combine = Array.prototype.concat(...Object.values(accessor));
console.log(combine)



NOTE 1: Accessor is pulled out in case it needs to change, but is not necessary