ZSCORE

Synopsis

ZSCORE key member

Returns the score of the member in the sorted set at key. If member does not exist in the sorted set, or key does not exist, null is returned. If key is associated with non sorted set data, an error is returned.

Return value

The score of member (a double precision floating point number), represented as string.

Examples

$ ZADD z_key 1.0 v1
(integer) 1
$ ZSCORE z_key v1
"1.0"
$ ZSCORE z_key v2
(null)

See also

zadd, zcard, zrange, zrangebyscore, zrem, zrevrange