Json
JSON.SET
Set the JSON value at path in key.
Arguments
keybodystringrequired
The key of the json entry.
pathbodystringrequired
The path of the value to set. $ is the root.
valuebodyTValuerequired
The value to set.
Response
OKrequired
OK
Example
Set the JSON value at path in key.redis.json.set(key, "$.path", value);NX
const value = ...redis.json.set(key, "$.path", value, { nx:true });XX
const value = ...redis.json.set(key, "$.path", value, { xx:true });