---
name: "keys"
type: command
status: ok
groups: ["HashMap"]
arma3_since: "2.02"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/keys
revid: 377092
updated: 2026-01-01T09:48:45Z
---

# keys

*Command · HashMap · Arma 3 v2.02*

## Description

Retrieves a list of all keys in a [HashMap](../topics/HashMap.md).

## Syntax

```sqf
keys hashMap
```

**Parameters:**

- `hashMap` : [HashMap](../topics/HashMap.md)

**Returns:** [Array](../topics/Array.md) of [Anything](../topics/Anything.md) - array of all keys in the HashMap

## Examples

### Example 1

```sqf
keys _myHashMap;
```

## See also

[HashMap](../topics/HashMap.md) · [values](../commands/values.md) · [toArray](../commands/toArray.md)

<sub>Source: [BI Community Wiki — keys](https://community.bistudio.com/wiki/keys) (revision 377092).</sub>
