Hash
HSET
Write one or more fields to a hash.
Arguments
keybodystringrequired
The key of the hash.
fieldsbody{ [fieldName]: TValue }required
An object of fields and their values.
Response
integerrequired
The number of fields that were added.
Example
await redis.hset("key", { id: 1, username: "chronark", name: "andreas" });