sortOn array field?

Hello,

I’ve used sortOn many times before, but have never used to to sort by a field in an array. What I mean is this:

Say I have an array of objects:
myArray.object1
myArray.object2
…myArray.object10

And each object in the array contains an array of values:
myArray.object1.anotherarray[0…10]

Why can’t I use sortOn to sort the first array (myArray) based on an array field in ‘anotherarray’?

I would think it would just work like this:
myArray.sortOn(“anotherarray[0]”, Array.NUMERIC);

But that doesn’t work. Any ideas? Shouldn’t this be a pretty basic sort?

Thanks,

Zach