HKEYS

Since 1.1.0Hashes

Syntax

HKEYS key
  • Flags: readonly
  • ACL categories: @hash, @read, @slow
  • Arity: 2

Returns the field names of the hash at key.

Reply

  • An array of field names; empty if the key does not exist.

Examples

> HSET u name Ada lang Rust
(integer) 2
> HKEYS u
1) "name"
2) "lang"