One liner to flatten nested object

Here you go: Summary: recursively create an array of one-property objects, then combine them all with Object.assign. This uses ES6 features including Object.assign or the spread operator, but it should be easy enough to rewrite not to require them. For those who don’t care about the one-line craziness and would prefer to be able to … Read more