{
  "schema_version": 2,
  "id": "commands/arset",
  "title": "ARSET",
  "url": "https://redis.io/docs/latest/commands/arset/",
  "summary": "Sets one or more contiguous values starting at an index 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": "02846ec1303317427c2a6be163fb6b2645e27b59b8a810933308b153eeac6fe3",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Sets one or more contiguous values starting at an index 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>index</code></summary>\n\nThe zero-based integer index at which to start writing. When multiple values are provided, they are stored at consecutive indices starting from `index`.\n\n</details>\n\n<details open><summary><code>value</code></summary>\n\nOne or more string values to store at consecutive indices beginning at `index`. The number of new (previously empty) slots filled is returned.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "redis> ARSET myarray 0 \"hello\"\n(integer) 1\nredis> ARGET myarray 0\n\"hello\"\nredis> ARSET myarray 2 \"a\" \"b\" \"c\"\n(integer) 3\nredis> ARGET myarray 2\n\"a\"\nredis> ARGET myarray 4\n\"c\""
    },
    {
      "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": []
}
