const bool = await redis.json.toggle("key", "$.path.to.array");

Arguments

key
string
required

The key of the json entry.

path
string
default:
"$"

The path of the boolean.

Response

The new value of the boolean.

const bool = await redis.json.toggle("key", "$.path.to.array");