await redis.hset("key", { id: 1, username: "chronark", name: "andreas" }); const [newCursor, fields] = await redis.hscan("key", 0); console.log(newCursor); // likely `0` since this is a very small hash console.log(fields); // ["id", 1, "username", "chronark", "name", "andreas"]
Scan a hash for fields.
0
[field, value, field, value]
Was this page helpful?