What is the best way to have a function sort an associative array by key? The following yields a conversion error. double[string] aa_sort(double[string] aa) { return aa.keys.sort; }