Json

JSON.MERGE

Merges the JSON value at path in key with the provided value.

Arguments

keybodystrrequired

The key of the json entry.

pathbodystrrequired

The path of the value to set.

valuebodystring | number | Record<string, unknown> | Array<unknown>required

The value to merge with.

Response

stringrequired

Returns "OK" if the merge was successful.

Example
await redis.json.merge("key", "$.path.to.value", {"new": "value"})
Loading search…