# Sorting an array of objects

**URL:** <https://forum.kirupa.com/t/sorting-an-array-of-objects/270802>\
**Category:** flash\
**Created:** [September 14, 2008, 4:37pm UTC](https://forum.kirupa.com/t/sorting-an-array-of-objects/270802 "2008-09-14T16:37:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![coggia](https://avatars.discourse-cdn.com/v4/letter/c/8c91f0/32.png) [@coggia](https://forum.kirupa.com/u/coggia)\
**Post date:** [September 14, 2008, 4:37pm UTC](https://forum.kirupa.com/t/sorting-an-array-of-objects/270802/1 "2008-09-14T16:37:07Z")

</div>

Hello,

i’ve made an array of objects like :  
(code is resumed of course)

```auto

_tab[x] = new ObjectName(..parameters);
_tab[x].z = z;

```

and I’d like to sort it by it’s z property with the help of “sortOn”  
but as it’s an array of objects the following syntax doesn’t work :

```auto

_tab.sortOn("z", Array.DESCENDING );

```

what is the correct syntax to touch the z property of my objects ?
