HLEN
HLEN key
@read, @hash, @fast, Returns the number of fields contained in the hash stored at key.
Integer reply: number of fields in the hash, or 0 when key does not exist.
HSET myhash field1 "Hello" HSET myhash field2 "World" HLEN myhash
© 2006–2022 Salvatore Sanfilippo
Licensed under the Creative Commons Attribution-ShareAlike License 4.0.
https://redis.io/commands/hlen/