> For the complete documentation index, see [llms.txt](https://daseldocs.tomwright.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://daseldocs.tomwright.me/v2/functions/keys.md).

# Keys

Keys expect no arguments.

Returns an array of keys for the current value, where the keys are either:

* Object field names
* Array indexes

## Example

```
$ echo '[1,2,3,4,5]' | dasel -r json 'keys()'
[
  0,
  1,
  2,
  3,
  4
]
```
