ZPOPMIN
Syntax
Section titled “Syntax”ZPOPMIN key [count]
ZPOPMIN removes and returns the member with the lowest score from the sorted set at the specified key.
If the key does not exist, the command returns empty list. An optional “count” argument can be provided to remove and return multiple members (up to the number specified).
Examples
Section titled “Examples”localhost:7379> ZADD users 1 aliceOK 1localhost:7379> ZADD users 2 bobOK 1localhost:7379> ZADD users 3 charlieOK 1localhost:7379> ZPOPMIN usersOK0) 1, alicelocalhost:7379> ZPOPMIN users 10OK0) 2, bob1) 3, charlie