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:
And each object in the array contains an array of values:
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:
But that doesn’t work. Any ideas? Shouldn’t this be a pretty basic sort?