Skip to main content

HGETALL

Note

Official reference: HGETALL.

Read every field and value of a hash.

Syntax

HGETALL key

Field order is not guaranteed. Use HGETALL for field-value pairs rather than pairing separate HKEYS and HVALS results by position.

Results

ReturnRowsContent
ResultSetmultipleFIELD field, STRING type
VALUE field, STRING type

Example

HSET demo:user name mali age 18
HGETALL demo:user