const newValue = await redis.json.numincrby("key", "$.path.to.array", 2);

Arguments

key
string
required

The key of the json entry.

path
string
default: "$"

The path of the array.

increment
number
required

The number to increment by.

Response

The new value after incrementing