I've been tinkering and was looking at for loops etc, then thought there's probably a quicker way to do this. Then I got lost in the lodash docs...
Anyway, I want to run over the following object—
{ stuff: { thing1: 'value1', thing2: 'value2', thing3: 'value3' }, something: 'value4' } —and return:
{ thing1: 'value1', thing2: 'value2', thing3: 'value3', something: 'value4' } That is, I want to eliminate the stuff level and have everything as siblings. In an easy / terse way, I mean. I tried _.flatten and ._flattenDepth but they only work with arrays (returns an empty array).
Thanks