Hash

HSTRLEN

Returns the string length of a value in a hash.

Arguments

keybodystringrequired

The key of the hash.

fieldbodystringrequired

The name of the field.

Response

integerrequired

0 if the hash or field does not exist. Otherwise the length of the string.

Example
const length = await redis.hstrlen("key", "field")
Loading search…