Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Redis HSCAN Command

Redis HSCAN Command

Redis Hash

The Redis HSCAN command is used to iterate over the key-value pairs in the hash.

Syntax

The basic syntax of the redis HSCAN command is as follows:



HSCAN key cursor [MATCH pattern] [COUNT count]

Available Version

= 2.8.0

Return Value

Each returned element is a tuple consisting of a field and its value.

Example



> HMSET sites google "google.com" runoob "runoob.com" weibo "weibo.com" 4 "taobao.com"

OK

> HSCAN sites 0 match "run*"

1) "0"

2) 1) "runoob"

2) "runoob.com"

Redis Hash