var arr:Array = []; arr[ 1 ] = { a:1 }; arr[ 12 ] = { b:2 }; arr[ 123 ] = { c:3 }; arr.sort(); arr.splice( arr.indexOf( undefined ) );