Sortting an Array by alphabet or number
Hi all, say I have a list of array like this
var SDArrayIndex = new Array();
var SDArrayName = new Array();
var SDArrayNum = new Array();
SDArrayIndex[0] = 1;
SDArrayName[0] = “Christopher”;
SDArrayNum[0] = “61101231”;
SDArrayIndex[1] = 2;
SDArrayName[1] = “Ronald”;
SDArrayNum[1] = “61101232”;
SDArrayIndex[2] = 3;
SDArrayName[2] = “Mary”;
SDArrayNum[2] = “61101233”;
SDArrayIndex[3] = 4;
SDArrayName[3] = “Lisa”;
SDArrayNum[3] = “61101234”;
SDArrayIndex[4] = 5;
SDArrayName[4] = “Michelle”;
SDArrayNum[4] = “61101235”;
SDArrayIndex[5] = 6;
SDArrayName[5] = “John”;
SDArrayNum[5] = “61101236”;
How can I sort all the array by ascending and descending order by both alphabet (SDArrayName) and by numerical (SDArraryIndex) value? Do note that all 3 array had to reflect accordingly… any idea?