The sorting function need not be that complicated.

Something like this will suffice:

results.sort(function(objA, objB) {
   if (objA.SORT_PROPERTY < objB.SORT_PROPERTY) {
       return -1; //Less than
   } else if (objA.SORT_PROPERTY > objB.SORT_PROPERTY) {
       return 1; //Greater than
   } else {
       return 0; //Equal
   }
});

Where SORT_PROPERTY is the name of the property of the object you want to
sort on.

- Jackie

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/How-to-sort-a-selection-set-tp4344383p4353253.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to