# ARSEEK

```json metadata
{
  "schema_version": 2,
  "title": "ARSEEK",
  "description": "Sets the ARINSERT / ARRING cursor to a specific index.",
  "categories": ["docs","develop","stack","oss","rs","rc","oss","kubernetes","clients"],
  "arguments": [{"key_spec_index":0,"name":"key","type":"key"},{"name":"index","type":"integer"}],
  "syntax_fmt": "ARSEEK key index",
  "complexity": "O(1)",
  "group": "array",
  "command_flags": ["WRITE","FAST"],
  "acl_categories": ["@write","@array","@fast"],
  "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":"redis-software-and-redis-cloud-compatibility","title":"Redis Software and Redis Cloud compatibility"},{"id":"return-information","title":"Return information"}]}

,
  "codeExamples": []
}
```

Sets the ARINSERT / ARRING cursor to a specific index.

## Required arguments

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

The name of the key that holds the array.

</details>

<details open><summary><code>index</code></summary>

The zero-based integer index to set as the new insert cursor position for subsequent [`ARINSERT`](https://redis.io/docs/latest/commands/arinsert) calls.

</details>

## Examples


redis> ARINSERT myarray "a"
(integer) 0
redis> ARINSERT myarray "b"
(integer) 1
redis> ARNEXT myarray
(integer) 2
redis> ARSEEK myarray 10
(integer) 1
redis> ARINSERT myarray "c"
(integer) 10
redis> ARNEXT myarray
(integer) 11


## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
|:----------------------|:-----------------|:------|
| <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> |  |

## Return information

**RESP2:**

[Integer reply](../../develop/reference/protocol-spec#integers): 1 if the cursor was set, 0 if the key does not exist.

**RESP3:**

[Integer reply](../../develop/reference/protocol-spec#integers): 1 if the cursor was set, 0 if the key does not exist.



