Arguments
string
required
The key of the list.
number
required
The index of the element to return, zero-based.
Response
The value of the element at index index in the list. If the index is out of range,
null is returned.Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
await redis.rpush("key", "a", "b", "c");
const element = await redis.lindex("key", 0);
console.log(element); // "a"
Returns the element at index index in the list stored at key.
null is returned.await redis.rpush("key", "a", "b", "c");
const element = await redis.lindex("key", 0);
console.log(element); // "a"
Was this page helpful?