---
name: "BIS_fnc_findAllNestedElements"
type: function
status: ok
groups: ["Arrays"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_findAllNestedElements
revid: 327526
updated: 2022-07-12T22:33:34Z
---

# BIS_fnc_findAllNestedElements

*Function · Arrays · Arma 3 v1.00*

## Description

Returns array of paths to all matching elements in deeply nested array, similar to [BIS_fnc_findNestedElement](../functions/BIS_fnc_findNestedElement.md) but with all occurences.

## Syntax

```sqf
[array, query] call BIS_fnc_findAllNestedElements
```

**Parameters:**

- `array`: [Array](../topics/Array.md) - array to explore
- `query`: [Anything](../topics/Anything.md) - wanted item

**Returns:** [Array](../topics/Array.md) of [Array](../topics/Array.md) of [Number](../topics/Number.md)s - path to the first occurence of *query*

## Examples

### Example 1

```sqf
private _array = [[1, 2, 3], [[1, 2, 3], 1, 2, 3]];
_result = [_array, 2] call BIS_fnc_findAllNestedElements; // returns [[0, 1], [1, 0, 1], [1, 2]]
```

## See also

[BIS_fnc_findNestedElement](../functions/BIS_fnc_findNestedElement.md) · [BIS_fnc_removeNestedElement](../functions/BIS_fnc_removeNestedElement.md) · [BIS_fnc_returnNestedElement](../functions/BIS_fnc_returnNestedElement.md) · [BIS_fnc_setNestedElement](../functions/BIS_fnc_setNestedElement.md)

<sub>Source: [BI Community Wiki — BIS fnc findAllNestedElements](https://community.bistudio.com/wiki/BIS_fnc_findAllNestedElements) (revision 327526).</sub>
