ARMSET

ARMSET key index value [index value ...]
Available since:
Redis Open Source 8.8.0
Time complexity:
O(N) where N is the number of pairs
ACL categories:
ARRAY,

Sets multiple index-value pairs in an array.

Required arguments

key

The name of the key that holds the array.

data

One or more index value pairs. Each index is a zero-based integer specifying where to write, and each value is the string to store at that position. Pairs may be non-contiguous and in any order.

Examples

ARMSET myarray 0 "alpha" 5 "beta" 100 "gamma" ARGET myarray 0 ARGET myarray 5 ARGET myarray 100

Return information

Integer reply: Number of new slots that were set (previously empty).
RATE THIS PAGE
Back to top ↑