await redis.hset("key", {field: "value"});
const field = await redis.hget("key", "field");
console.log(field); // "value"

Arguments

key
string
required

The key to get.

field
string
required

The field to get.

Response

The value of the field, or null, when field is not present in the hash or key does not exist.

await redis.hset("key", {field: "value"});
const field = await redis.hget("key", "field");
console.log(field); // "value"