Redis Advanced icon

Redis Advanced

Get, send and update data in Redis with enhanced operations

JSON Set

AI-generated

Summary

Set a JSON value at a specified path within a Redis key, with optional conditional modes controlling when the set occurs.

Inputs

  • Key (required) — The Redis key to set the JSON value for.
  • Path — JSONPath specifying where to set the JSON value; defaults to root ($). For new keys, the path must be root.
  • Value (required) — The JSON value to set at the specified path, provided as a JSON string.
  • Set Mode — Determines when to set the value: Default sets normally; NX sets only if the key does not exist; XX sets only if the key exists.

Output shape

a list of items corresponding to each input item, each containing JSON with the Redis key, path, the raw Redis command result (typically 'OK'), and a success boolean indicating if the operation succeeded.

Each input item processes independently; errors per item are included if 'Continue On Fail' is enabled. The Redis command used is JSON.SET, and the value is parsed from the provided JSON string before setting. The path must be '$' for new keys.

Discussion