# $listItems->findByKey()

> Find a single element by key (id)

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

```php
$listItems->findByKey(string $key): TValue|null
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$key` | `string` | `–` |

## Return type

`TValue|null`

## Parent class

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