Json
JSON.ARRTRIM
Trim an array so that it contains only the specified inclusive range of elements.
Arguments
keybodystringrequired
The key of the json entry.
pathbodystringrequired
The path of the array. $ is the root.
startbodyintegerrequired
The start index of the range.
stopbodyintegerrequired
The stop index of the range.
Response
integer[]required
The length of the array after the trimming.
Example
const length = await redis.json.arrtrim("key", "$.path.to.array", 2, 10);