---
title: "filter"
description: "Returns all the nodes matching the given [matcher]."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
@CheckResult
fun SemanticsNodeInteractionCollection.filter(
    matcher: SemanticsMatcher
): SemanticsNodeInteractionCollection
```


Returns all the nodes matching the given `matcher`.

#### Parameters

| | |
| --- | --- |
| matcher | Matcher to use for the filtering. |




