ARDEL

ARDEL key index [index ...]
Available since:
Redis Open Source 8.8.0
Time complexity:
O(N) where N is the number of indices to delete
ACL categories:
ARRAY,

Deletes elements at the specified indices in an array.

Required arguments

key

The name of the key that holds the array.

index

One or more zero-based integer indices of the elements to delete. Deleting an index that does not exist counts as zero elements deleted and does not modify the array.

Examples

ARSET myarray 0 "a" ARSET myarray 1 "b" ARSET myarray 2 "c" ARDEL myarray 1 ARGET myarray 1 ARDEL myarray 0 2 ARCOUNT myarray

Return information

Integer reply: Number of elements deleted.
RATE THIS PAGE
Back to top ↑