API ReferenceLists
LIndex
Get an element from a list by its index
Syntax
Redix.LIndex(key, index, callback)Parameters
Prop
Type
Returns
Prop
Type
Examples
-- Get first element
Redix.LIndex('queue:tasks', 0, function(err, task)
print('Next task:', task.task)
end)
-- Get last element
Redix.LIndex('notifications', -1, function(err, notification)
print('Last notification:', notification.content)
end)