LINDEX
Since 1.1.0Lists
Syntax
LINDEX key indexReturns the element at index in the list at key. Negative indexes count from the end.
Reply
- The element.
nilif the index is outside the list, or the key does not exist.
Examples
> RPUSH l a b c
(integer) 3
> LINDEX l 0
"a"
> LINDEX l -1
"c"
> LINDEX l 9
(nil)