SortArrayByArrayElement

Category: Script / Arrays
Since engine version: 4.0 OC

Description

Sorts an array of arrays by a subarray element. All elements must be arrays of at least element_index+1 size. Subarray elements should be either all strings or all integer.

Syntax

bool SortArrayByArrayElement(array array2sort, int element_index, bool descending);

Parameters

array2sort:
Array that is to be sorted
element_index:
Index of element in sub-array by which sorting should happen
descending:
If true, elements are sorted in descending (highest to lowest) order. Otherwise ascending order.
See also: SortArray, SortArrayByProperty
Sven2, 2012-12