SORT_RO

Returns sorted collection elements through the read-only command.

Keys & expiration · Example verified

Syntax covered here

SORT_RO key

The verified input is a list of numeric strings, returned in ascending numeric order.

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
> RPUSH numbers 3 1 2
3
# connection: default
> sort_ro numbers
["1","2","3"]