getDataKeys()function

getDataKeys(data: T): ImmutableArray<DataKey<T>>
getDataKeys(data: T | Partial<T>): ImmutableArray<DataKey<T>>
ParamType
dataT
The data object to read. required
dataT
Partial<T>
required
Return
ImmutableArray<DataKey<T>>
An immutable array of the object's string keys.
ImmutableArray<DataKey<T>>
Immutable array: an array that cannot be changed.

Get the keys of a data object as an array.

Examples

getDataKeys({ a: 1, b: 2 }) // ["a", "b"]