flatten

From Bohemia Interactive Community
Jump to navigation Jump to search
Hover & click on the images for descriptions

Description

Description:
Flattens an array.

Syntax

Syntax:
flatten array
Parameters:
array: Array
Return Value:
Array - Flattened array

Examples

Example 1:
flatten [ 1, [2], [[3]], [[[4]]] ]; // Returns [1, 2, 3, 4]
Example 2:
flatten getUnitLoadout player;

Additional Information

See also:
arrayIntersect
Groups:
Arrays

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note