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