Object to flatten
OptionalflattenPredicate: (obj: any) => anywhen this predicate returns false the object will not be flattened otherwise; if not set all objects will be flattened
optional separator
OptionalkeyPrefix: stringkey which will prefixes the new keys
Flatten an object with nested objects to a flat structure in which nested objects can be accessed directly using a key separator. I.e:
Creates a new object and does not alter the existing structure