# HMGET

> Return the requested fields and their values.

## Arguments

<ParamField body="key" type="string" required>
  The key of the hash.
</ParamField>

<ParamField body="fields" type="...string[]" required>
  One or more fields to get.
</ParamField>


## Response

<ResponseField type="Record<string, unknown>" required>
 An object containing the fields and their values.
</ResponseField>

<RequestExample>
```ts Example
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" }
```
</RequestExample>
