Removes and returns one or more random members from a set.
await redis.sadd("set", "a", "b", "c"); const popped = await redis.spop("set"); console.log(popped); // "a"
The key of the set.
How many members to remove and return.
The popped member. If count is specified, an array of members is returned.
count
Was this page helpful?