Object Flattener
With this package you can flatten nested arrays and objects super simple.
Usage 🤱
- flatten(object, null); default value, returns both keys and values
- flatten(object, false); returns only values
- flatten(object, true); returns only keys
const flatten = ;const obj = key1: 'stringValue' key2: 'arrayValue' 'arrayValue2' key3: obj1: 'objArrayValue' obj2: 'Obj3Value1' obj3: 'obj4Value2' ; ; // This will produce an array with all keys and values; // This will produce an array with all keys; // This will produce an array with all values