HGET

Syntax

1. HGET key field

Time complexity: O(1)

Returns the value associated with field in the hash stored at key.

Return

Bulk string reply: the value associated with field, or nil when field is not present in the hash or key does not exist.

Examples

1. dragonfly> HSET myhash field1 "foo"
2. (integer) 1
3. dragonfly> HGET myhash field1
4. "foo"
5. dragonfly> HGET myhash field2
6. (nil)