List
LSET
Set a value at a specific index.
await redis.lpush("key", "a", "b", "c");
await redis.lset("key", 1, "d");
// list is now ["a", "d", "c"]
Arguments
key
string
requiredThe key of the list.
index
number
requiredAt which index to set the value.
data
TValue
requiredThe value to set.
Response
OK
await redis.lpush("key", "a", "b", "c");
await redis.lset("key", 1, "d");
// list is now ["a", "d", "c"]