HGET
语法
HGET key field
- 从以下位置开始可用:
- 2.0.0
- 时间复杂度:
- O(1)
- ACL 类别:
-
@read
,@hash
,@fast
,
返回与 关联的值field
在存储在key
.
例子
Give these commands a try in the interactive console:
RESP2 Reply
One of the following:
- Bulk string reply: The value associated with the field.
- Nil reply: If the field is not present in the hash or key does not exist.
RESP3 Reply
One of the following:
- Bulk string reply: The value associated with the field.
- Null reply: If the field is not present in the hash or key does not exist.