getDataKeys()function
getDataKeys(data: T): ImmutableArray<DataKey<T>>
getDataKeys(data: T | Partial<T>): ImmutableArray<DataKey<T>>
| Param | Type | |
|---|---|---|
data | T | The data object to read. required |
data | TPartial<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"]