LINDEX
Returns the list element at a specified index.
Lists · Example verified
Syntax covered here
LINDEX key indexThe tested index is zero-based, so index 1 selects the second element.
Tested example & replies
Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.
# connection: default
> RPUSH queue a b c
3
# connection: default
> LINDEX queue 1
"b"