I have an array which stores xml data with some properties. For example:
<item name="aaa" age="111" />
I'm trying to find a way to sort my data by @name property in first way and by @age in second way but I'd like @name to be sorted ascending and @age descending.
There is method sortOn (in Array class) and I can pass it several fields to sort by but how could I tell it in which way (asc,desc) it should sort each fileld?
From the doc:
Array.sortOn (["a", "b", "c"], [Array.DESCENDING, Array.NUMERIC,
ups... my bad
I didn't notice it or I thought that all options provided as a second parametr refer to all fields provided as a first parameter.