I was wondering if there is an elegant way of sorting dict by value in Tcl.
Suppose I have a following dict:
set d1 [dict create k1 10 k2 89 k3 1 k4 15 k5 20]
# Results in dict of form
# k1 => 10
# k2 => 89
# k3 => 1
# k4 => 15
# k5 => 20
Now I want to sort this dictionary so that I have:
# k3 => 1
# k1 => 10
# k4 => 15
# k5 => 20
# k2 => 89
I was hoping there is something similar to Python's sorted().