Trim an array so that it contains only the specified inclusive range of elements.
const length = await redis.json.arrtrim("key", "$.path.to.array", 2, 10);
The key of the json entry.
The path of the array.
The start index of the range.
The stop index of the range.
The length of the array after the trimming.
Was this page helpful?