Checks if a field exists in a hash.
await redis.hset("key", "field", "value"); const exists = await redis.hexists("key", "field"); console.log(exists); // 1
The key to get.
The field to check.
1 if the hash contains field. 0 if the hash does not contain field, or key does not exist.
1
field
0
key
Was this page helpful?