HMSET key data
Available since
Time complexity
O(N) where N is the number of fields being set.
ACL categories
@write, @hash, @fast

Sets the specified fields to their respective values in the hash stored at key. This command overwrites any specified fields already existing in the hash. If key does not exist, a new key holding a hash is created.

Examples #

HMSET myhash field1 "Hello" field2 "World"
HGET myhash field1
HGET myhash field2

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.