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.


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

See also

zadd, zcard, zrange, zrangebyscore, zrem, zrevrange