Remove the first count occurrences of an element from a list.
count
await redis.lpush("key", "a", "a", "b", "b", "c"); const removed = await redis.lrem("key", 4, "b"); console.log(removed) // 2
The key of the list.
How many occurrences of the element to remove.
The element to remove
The number of elements removed.
Was this page helpful?