Function: getDeepObjectKeys()
getDeepObjectKeys<
T
>(obj
:AnyObject
<T
>,options
?:GetDeepObjectKeysOptions
):string
[]
Flattens an object to a list of its keys, traversing deeply into nested objects and arrays of objects.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type | Description |
---|---|---|
obj | AnyObject <T > | 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'
.