Function: getDeepObjectKeys()
getDeepObjectKeys(
obj:object,options?:GetDeepObjectKeysOptions):string[]
Defined in: getDeepObjectKeys.ts:14
Flattens an object to a list of its keys, traversing deeply into nested objects and arrays of objects.
Parameters
| Parameter | Type | Description |
|---|---|---|
obj | object | The object of which to deeply retrieve its keys |
options? | GetDeepObjectKeysOptions | The options with which to customize the output of this function |
Returns
string[]
An array of strings holding the keys of the object
Note
By default Nested array values are flattened to arrayKey.${index}.subKey.
This can be changed to arrayKey[${index}].subKey by setting options.arrayKeysIndexStyle to 'braces-with-dot'.
Or it can also be changed to arrayKey[${index}]subKey by setting options.arrayKeysIndexStyle to 'braces'.