# $listItems->toArray()

> Converts the object into an array

- Source: `src/Toolkit/Collection.php#L1149` <https://github.com/getkirby/kirby/blob/6.0.0-beta.1/src/Toolkit/Collection.php#L1149>
- Inherited from Kirby, not part of the Merx API. See <https://getkirby.com/docs/reference>.

```php
$listItems->toArray(null|Closure $map = null): array
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$map` | `null\|Closure` | `null` |

## Return type

`array`

## Parent class

`Wagnerwagner\Merx\ListItems` inherited from `Kirby\Toolkit\Collection`
