# GetKeyValueArrays(AllocatorHandle)

> Returns a NativeKeyValueArrays with a copy of all this hash map's keys and values.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public NativeKeyValueArrays<TKey, TValue> GetKeyValueArrays(AllocatorManager.AllocatorHandle allocator)
```

### Parameters

**** (\[AllocatorHandle]\(/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle)): The allocator to use.

### Returns

| Type                                                                                                      | Description                                                                |
| --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [NativeKeyValueArrays\<T, T>](/engine/6000.7/script-reference/unity/collections/nativekeyvaluearrays2.md) | A NativeKeyValueArrays with a copy of all this hash map's keys and values. |

### Remarks

The key-value pairs are copied in no particular order. For all `i`, `Values[i]` will be the value associated with `Keys[i]`.
