2 Replies Latest reply on Mar 28, 2010 6:28 AM by Piotr Wierzgała

    array sortOn issue

    Piotr Wierzgała

      Hi everybody,


      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?