Hash
HLEN
Returns the number of fields contained in the hash stored at key.
await redis.hset("key", {
id: 1,
username: "chronark",
});
const fields = await redis.hlen("key");
console.log(fields); // 2
await redis.hset("key", {
id: 1,
username: "chronark",
});
const fields = await redis.hlen("key");
console.log(fields); // 2