ZSCAN

Iterates through sorted-set members and scores with a cursor.

Sorted sets · Example verified

Syntax covered here

ZSCAN key cursor

The small tested set starts at cursor 0 and completes in one batch containing member-score pairs.

Tested example & replies

Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.

# connection: default
> ZADD scores 1 a 2 b
2
# connection: default
> ZSCAN scores 0
["0",["b","2","a","1"]]