sortメソッドに比較関数を渡せばおk
f.test.sort(function(a, b) { return a[5] < b[5]; }, true);