HMGET key field
Available since
Time complexity
O(N) where N is the number of fields being requested.
ACL categories
@read, @hash, @fast

Returns the values associated with the specified fields in the hash stored at key.

For every field that does not exist in the hash, a nil value is returned. Because non-existing keys are treated as empty hashes, running HMGET against a non-existing key will return a list of nil values.

HSET myhash field1 "Hello"
HSET myhash field2 "World"
HMGET myhash field1 field2 nofield

Redict logo courtesy of @janWilejan, CC-BY-SA-4.0. Download SVG ⤑

Portions of this website courtesy of Salvatore Sanfilippo, CC-BY-SA-4.0.