Redis Advanced icon

Redis Advanced

Get, send and update data in Redis with enhanced operations

Hash Length

AI-generated

Summary

Get the number of fields stored in a specified hash key in Redis.

Inputs

  • Hash (required) — The name of the Redis hash key to query.

Output shape

A single JSON object containing the hash name and the number of fields in the hash.

The output JSON has the format { hash: string, length: number }. This operation does not support pagination or additional fields.

Examples

Example 1: Retrieve the count of fields in the Redis hash named 'user:1000'.

Set 'Hash' to 'user:1000' and select operation 'Hash Length'.

Discussion