API ReferenceJSON
JSONArrTrim
Trim a JSON array to a specified range
Syntax
Redix.JSONArrTrim(key, path, start, stop)Parameters
Prop
Type
Returns
Prop
Type
Example
-- Keep only first 10 items
Redix.JSONArrTrim('character:123', '$.inventory', 0, 9)
-- Keep last 5 notifications
Redix.JSONArrTrim('character:123', '$.notifications', -5, -1)