Redis Advanced icon

Redis Advanced

Get, send and update data in Redis with enhanced operations

Hash Exists

AI-generated

Summary

Check whether a specific field exists within a Redis hash key.

Inputs

  • Hash (required) — Name of the Redis hash key to check.
  • Field (required) — Field name within the hash to verify existence.
  • Value Is JSON — Indicates if the value is JSON or key-value pairs (used only if key is of type 'hash'). Defaults to true.

Output shape

A single JSON object containing the hash name, field name, and a boolean 'exists' indicating if the field exists.

Returns { json: { hash: string, field: string, exists: boolean } } for each input item. The 'Value Is JSON' parameter does not affect the existence check but is available for consistency with related operations.

Examples

Example 1: Check if field 'user123' exists in hash 'userProfiles'

Set 'Hash' to 'userProfiles' and 'Field' to 'user123', then execute the operation.

Discussion