> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-dx-3009-array-sdk-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ARMSET

> Write values at several array indexes.

These writes leave the append cursor unchanged.

## Arguments

<ParamField body="key" type="string" required>
  The array key.
</ParamField>

<ParamField body="values" type="Record<number | string, TData> | [number | string, TData][]" required>
  A mapping of indexes to values, or an iterable of index-value pairs. Provide at least one pair.
</ParamField>

## Response

<ResponseField type="number" required>
  The number of previously empty slots that were filled.
</ResponseField>

<RequestExample>
  ```ts Example theme={"system"}
  console.log(await redis.armset("readings", { 0: "a", 10: "b" })); // 2
  console.log(await redis.armset("readings", [[10, "B"], [20, "c"]])); // 1
  ```
</RequestExample>

See the [server command reference](/redis/commands/array/armset) for protocol details.
