2 Replies Latest reply on Sep 22, 2008 1:49 PM by Rothrock

    Sorting multidimensional arrays

    invisibleBlade
      I have an array containing random dates, each in its own small array of which the first node is the month and the second the year:
      var arr:Array = [
      [1,2008],
      [2,2009],
      [6,2009],
      [4,2008],
      [4,2008]
      ];

      I am trying to write a sorting function to use with arr.sort() that will use the year AND month nodes to arrange the dates chronologically. Can't get it to work though, anyone have any advice?

      Cheers all