Elisp: Sort Hash Table
To sort, first use map-pairs to convert it to a
Association List.
;; make hash table (progn (setq xx (make-hash-table :test 'equal)) (puthash "joe" 3 xx) (puthash "jane" 9 xx) (puthash "liz" 2 xx)) (require 'map) ;; sort by value (sort (map-pairs xx) :key 'cdr) ;; (("liz" . 2) ("joe" . 3) ("jane" . 9))