ARSEEK

ARSEEK key index
Available since:
Redis Open Source 8.8.0
Time complexity:
O(1)
ACL categories:
ARRAY,

Sets the ARINSERT / ARRING cursor to a specific index.

Required arguments

key

The name of the key that holds the array.

index

The zero-based integer index to set as the new insert cursor position for subsequent ARINSERT calls.

Examples

ARINSERT myarray "a" ARINSERT myarray "b" ARNEXT myarray ARSEEK myarray 10 ARINSERT myarray "c" ARNEXT myarray

Return information

Integer reply: 1 if the cursor was set, 0 if the key does not exist.
RATE THIS PAGE
Back to top ↑