Json
JSON.GET
Get a single value from a JSON document.
Arguments
keybodystringrequired
The key of the json entry.
optionsbody
pathsbody...string[]required
One or more paths to retrieve from the JSON document. $ is the root.
Response
(TValue | null)[]required
The value at the specified path or null if the path does not exist.
Example
const value = await redis.json.get("key", "$.path.to.somewhere");With Options
const value = await redis.json.get("key", { indent: " ", newline: "\n", space: " ",}, "$.path.to.somewhere");