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

**URL:** <https://forum.kirupa.com/t/sorting-a-new-array-from-an-existing-array-emergency/163124>\
**Category:** flash\
**Created:** [September 20, 2005, 1:06am UTC](https://forum.kirupa.com/t/sorting-a-new-array-from-an-existing-array-emergency/163124 "2005-09-20T01:06:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ozeona](https://avatars.discourse-cdn.com/v4/letter/o/cab0a1/32.png) [@Ozeona](https://forum.kirupa.com/u/Ozeona)\
**Post date:** [September 20, 2005, 1:06am UTC](https://forum.kirupa.com/t/sorting-a-new-array-from-an-existing-array-emergency/163124/1 "2005-09-20T01:06:07Z")

</div>

Hi

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

```auto
 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.
