# sortOn when an array contains objects?

**URL:** <https://forum.kirupa.com/t/sorton-when-an-array-contains-objects/270054>\
**Category:** flash\
**Created:** [September 4, 2008, 6:37pm UTC](https://forum.kirupa.com/t/sorton-when-an-array-contains-objects/270054 "2008-09-04T18:37:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stickeroo](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Stickeroo](https://forum.kirupa.com/u/Stickeroo)\
**Post date:** [September 4, 2008, 6:37pm UTC](https://forum.kirupa.com/t/sorton-when-an-array-contains-objects/270054/1 "2008-09-04T18:37:15Z")

</div>

I have an array made up of generic objects; all of the objects have the same properties, one of which is a textfield (named, creatively enough, “textfield”).

What I need to be able to do is sort the array based on the text property of the textfield property, something like this:

```auto

listArray.sortOn("textfield.text", Arrray.CASEINSENSITIVE)

```

which doesn’t work. Can anyone suggest a functional way to do this? Thanks!
