Category: Script / Arrays
Since engine version: 4.0 OC
Sorts an array of proplists by a property. All elements must be proplists. Properties should be either all strings or all integer. If a property is not assigned, it is assumed to be integer zero.
bool SortArrayByProperty(array array2sort, string property_name, bool descending);
- Array that is to be sorted
- Name of property by which the array is to be sorted
- If true, elements are sorted in descending (highest to lowest) order. Otherwise ascending order.