Last updated 2 years ago
Index expect 1 argument.
It can be used with a list, and returns the value at the given index list.
Because the index function is commonly used dasel has a recognised alias of [x] that results in a index(x) call.
[x]
index(x)
$ echo '["a","b","c"]' | dasel -r json 'index(1)' "b"
$ echo '["a","b","c"]' | dasel -r json '[1]' "b"