# DATAFILE::DATADICT_GET_ARRAY

- **Hash:** `0x1B5447CF18544B18`
- **Namespace:** DATAFILE
- **Runtime name (Lua/JS):** `DatadictGetArray`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/DATAFILE/DATADICT_GET_ARRAY

## Signature

```c
Any* DATADICT_GET_ARRAY(Any* objectData, const char* key);
```

## Parameters

- `objectData` (`Any*`)
- `key` (`const char*`)

## Returns

`Any*`

## Usage

### Lua

```lua
local retval, objectData = DatadictGetArray(key)

-- always available, by hash
local retval, objectData = Citizen.InvokeNative(0x1B5447CF18544B18, Citizen.PointerValueInt(), key, Citizen.ResultAsLong())
```

### JavaScript

```js
const [retval, objectData] = DatadictGetArray(key);

// by hash
const [retval, objectData] = Citizen.invokeNative('0x1B5447CF18544B18', Citizen.pointerValueInt(), key, Citizen.returnResultAnyway(), Citizen.resultAsLong());
```

### C#

```csharp
var objectData = new OutputArgument();
long retval = Function.Call<long>((Hash)0x1B5447CF18544B18, objectData, key);
// objectData.GetResult<int>()
```

- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
- `Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below.

*Sources: alloc8or RDR3 NativeDB.*
