HLEN

Usage:
HLEN key
Complexity:
O(1)
Since:
2.0.0

Returns the number of fields contained in the hash stored at key.

Examples

HSET myhash field1 "Hello"
HSET myhash field2 "World"
HLEN myhash