HVALS
Since 1.1.0Hashes
Syntax
HVALS keyReturns the values of all the fields of the hash at key, without their names. HKEYS returns the names, and HGETALL both.
The values come in the order their fields were first set, the same order as HKEYS and HGETALL, so the two replies line up by position. See HKEYS for how deleting fields affects that order.
Fields whose expiry has passed are left out. The whole list comes back in one reply, so for a hash with very many fields, HSCAN returns them a page at a time instead.
Reply
- An array of values.
- An empty array if the key does not exist.
Errors
WRONGTYPE Operation against a key holding the wrong kind of valueif the key holds something other than a hash.
Examples
> HSET u name Ada lang Rust
(integer) 2
> HVALS u
1) "Ada"
2) "Rust"
> HKEYS u
1) "name"
2) "lang"
> HVALS missing
(empty array)