var dataArray:Array = [ 5, 6, 3, 8, 10, 11, 32, 2 ];
var dataObjectArray:Array [ { "uid": 5 }, { "uid": 6 .... Similar to above ... } ];
I have the above 2 arrays in AS3. and i wish to sort them numerically (1 ~ X) in order [Skipping those that does not exist]. What is the best and most efficent way to do so for dataArray / dataObjectArray.
You may solve 1, or both =)
Have you tried:
dataArray.sort( Array.NUMERIC );
dataObjectArray.sortOn( ["uid"], [Array.NUMERIC]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With