Redis HSCAN Command
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]
- cursor - The cursor.
- pattern - The pattern to match.
- count - Specifies how many elements to return from the data set; the default value is 10.
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