keys
keys of a dict or indexes of a list
(any subject) -> list
If subject
is a dict, returns a list of present keys - key order is undefined.
If subject
is a list, returns a list of present indexes in order.
Returns nil
if subject
is nil
Throws an error if subject
is of any other type.
Parameters
Name | Type | Description |
---|---|---|
subject |
dict or list | The list or dict to work with |