Return a random element from the set value stored at key.
This operation is similar to SPOP, however while SPOP also removes the randomly selected element from the set, SRANDMEMBER will just return a random element without altering the original set in any way.
Return value
Bulk reply: the randomly selected element, or nil when key does not exist.
Examples
redis>
SADD myset "one"
(integer) 1redis> SADD myset "two"
(integer) 1redis> SADD myset "three"
(integer) 1redis> SRANDMEMBER myset
"two"