order array by object variable
Hello !
I have an array which I'm looping through to get variables(as text) to display in dynamic text fields..
If possible I would like to sort the array into numeric order using "sTabArray.sHour". A variable of each of the array items..
Is there a way I can do this ? Maybe create a new array from the original one and then use that ??
for(i = 0; i < sTabArray.length; i++) {
var sMin:String = sTabArray.sMin;
var fMin:String = sTabArray.fMin;
var table_number:String = sTabArray.table_number;
var salle_number:String = sTabArray.salle_number;
printBox["horaires" + i].text = sTabArray.sHour + ":" + sMin + " à " + sTabArray.fHour + ":" + fMin;
printBox["evenement" + i].text = sTabArray.titre;
printBox["salle" + i].text = salle_number;
printBox["table_no" + i].text = table_number;
}
Many thanks in advance for you help
Martin