Json
JSON.ARRPOP
Remove and return an element from the index in the array. By default the last element from an array is popped.
Arguments
keybodystrrequired
The key of the json entry.
pathbodystrrequired
The path of the array. $ is the root.
indexbodyintdefault: -1
The index of the element to pop.
Response
List[TValue | null]required
The popped element or null if the array is empty.
Example
element = redis.json.arrpop("key", "$.path.to.array")First
firstElement = redis.json.arrpop("key", "$.path.to.array", 0)