{
  "id": "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.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-05-25T10:30:01-07:00",
  "page_type": "content",
  "content_hash": "8800582df644e6dff004d072071f13d7c3b558e009194d0786bcc8063ef99047",
  "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": "ARSET myarray 0 \"hello\"\nARGET myarray 0\nARSET myarray 2 \"a\" \"b\" \"c\"\nARGET myarray 2\nARGET myarray 4"
    },
    {
      "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": []
}
