await redis.hset("key", {
  id: 1,
  username: "chronark",
  name: "andreas"
  });

Arguments

key
string
required
The key of the hash.
fields
{ [fieldName]: TValue }
required
An object of fields and their values.

Response

The number of fields that were added.
await redis.hset("key", {
  id: 1,
  username: "chronark",
  name: "andreas"
  });