HMGET

Since 1.1.0Hashes

Syntax

HMGET key field [field ...]
  • Flags: fast, readonly
  • ACL categories: @fast, @hash, @read
  • Arity: -3

Returns the values of several fields of the hash at key.

Reply

  • An array with one element per field, in the order given: the value, or nil for a field that does not exist.

Examples

> HSET u name Ada lang Rust
(integer) 2
> HMGET u name nope lang
1) "Ada"
2) (nil)
3) "Rust"