Arma 3 Scripting

Function in Arrays

BIS_fnc_findAllNestedElements

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns array of paths to all matching elements in deeply nested array, similar to BIS_fnc_findNestedElement but with all occurences.

Syntax

[array, query] call BIS_fnc_findAllNestedElements

Parameters:

Returns: Array of Array of Numbers - path to the first occurence of query

Examples

Example 1

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 · BIS_fnc_removeNestedElement · BIS_fnc_returnNestedElement · BIS_fnc_setNestedElement