HRANDFIELD

Returns a randomly selected hash field name.

Hashes · Example verified

Syntax covered here

HRANDFIELD key

The verified hash has one field, and the plain form returns its name without the value.

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
> HSET user name Ada
1
# connection: default
> HRANDFIELD user
"name"