Return the requested fields and their values.
await redis.hset("key", { id: 1, username: "chronark", name: "andreas" }); const fields = await redis.hmget("key", "username", "name"); console.log(fields); // { username: "chronark", name: "andreas" }
The key of the hash.
One or more fields to get.
An object containing the fields and their values.
Was this page helpful?