Arguments
string
required
The key of the hash.
...string[]
required
One or more fields to get.
Response
An object containing the fields and their values.
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
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" }
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" }
Was this page helpful?