HGET
This page documents the preview (v2.21) version. Preview includes features under active development and is for development and testing only. For production, use the stable (v2024.1) version.
Synopsis
HGET key field
This command fetches the value for the given field in the hash that is specified by the given key.
- If the given
keyorfielddoes not exist, nil is returned. - If the given
keyis associated with non-hash data, an error is raised.
Return value
Returns the value for the given field
Examples
$ HSET yugahash area1 "America"
1
$ HGET yugahash area1
"America"
See also
hdel, hexists, hgetall, hkeys, hlen, hmget, hmset, hset, hincrby, hstrlen, hvals