Sorting a new array from an existing array (emergency!)

Hi

i got an existing array, main[y], which after an equation, will come out with another array.

 if (main[y] === topicList.getValue()){
 subTopic = [];
 subTopic = fTitle[y]
 trace(subTopic)
}

However, i could not sort the subTopic, as it gkeep giving me undefined. Is there any way to sort this subTopic, such that they are in alphabetical orders?

Appreciate any help.