SortArrayByProperty

Category: Script / Arrays
Since engine version: 4.0 OC

Description

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.

Syntax

bool SortArrayByProperty(array array2sort, string property_name, bool descending);

Parameters

array2sort:
Array that is to be sorted
property_name:
Name of property by which the array is to be sorted
descending:
If true, elements are sorted in descending (highest to lowest) order. Otherwise ascending order.
See also: SortArray, SortArrayByArrayElement
Sven2, 2012-12