CBA_fnc_sortNestedArray

Description

Sorts the given nested array in either ascending or descending order based on the numerical value at specified index of sub arrays.

Original array is modified.

Parameters

_arrayNested array to be sorted ARRAY
_indexSub array item index to be sorted on <NUMBER>
_ordertrue: ascending, false: descending (optional, default: true) <BOOLEAN>

Example

_array = [_array, 1] call CBA_fnc_sortNestedArray

Returns

Sorted array ARRAY

Author

commy2, mharis001

Array to read from [Array]
Close