{
  "schema_version": 2,
  "id": "commands/armset",
  "title": "ARMSET",
  "url": "https://redis.io/docs/latest/commands/armset/",
  "summary": "Sets multiple index-value pairs in an array.",
  "since": "8.8.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-07-24T11:07:00+02:00",
  "page_type": "content",
  "content_hash": "d0ea7a48d7b17366ce82ca1f14a665afd84fe6c9bc526c7c2d3fc36df784b08d",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Sets multiple index-value pairs in an array."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary>\n\nThe name of the key that holds the array.\n\n</details>\n\n<details open><summary><code>data</code></summary>\n\nOne 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.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "redis> ARMSET myarray 0 \"alpha\" 5 \"beta\" 100 \"gamma\"\n(integer) 3\nredis> ARGET myarray 0\n\"alpha\"\nredis> ARGET myarray 5\n\"beta\"\nredis> ARGET myarray 100\n\"gamma\""
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> | <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Integer reply](../../develop/reference/protocol-spec#integers): Number of new slots that were set (previously empty).\n\n**RESP3:**\n\n[Integer reply](../../develop/reference/protocol-spec#integers): Number of new slots that were set (previously empty)."
    }
  ],
  "examples": []
}
