# ARINSERT

```json metadata
{
  "title": "ARINSERT",
  "description": "Inserts one or more values at consecutive indices.",
  "categories": ["docs","develop","stack","oss","rs","rc","oss","kubernetes","clients"],
  "arguments": [{"key_spec_index":0,"name":"key","type":"key"},{"multiple":true,"name":"value","type":"string"}],
  "syntax_fmt": "ARINSERT key value [value ...]",
  "complexity": "O(N) where N is the number of values",
  "group": "array",
  "command_flags": ["WRITE","DENYOOM","FAST"],
  "acl_categories": ["ARRAY"],
  "since": "8.8.0",
  "arity": -3,
  "key_specs": [{"begin_search":{"index":{"pos":1}},"find_keys":{"range":{"lastkey":0,"limit":0,"step":1}},"flags":["RW","UPDATE"]}],
  "tableOfContents": {"sections":[{"id":"required-arguments","title":"Required arguments"},{"id":"examples","title":"Examples"},{"id":"return-information","title":"Return information"}]}

,
  "codeExamples": []
}
```Inserts one or more values at consecutive indices.

## Required arguments

<details open><summary><code>key</code></summary>

The name of the key that holds the array.

</details>

<details open><summary><code>value</code></summary>

One or more string values to insert at consecutive indices, beginning at the current insert cursor position. The cursor advances by one for each value inserted. Use [`ARNEXT`](https://redis.io/docs/latest/commands/arnext) to inspect the current cursor position and [`ARSEEK`](https://redis.io/docs/latest/commands/arseek) to reposition it.

</details>

## Examples


ARINSERT myarray "alpha"
ARINSERT myarray "beta"
ARINSERT myarray "gamma"
ARGET myarray 1
ARNEXT myarray


## Return information

**RESP2:**

[Integer reply](../../develop/reference/protocol-spec#integers): The last index where a value was inserted.

**RESP3:**

[Integer reply](../../develop/reference/protocol-spec#integers): The last index where a value was inserted.



