How do I sort a dictionary by its keys?

You may also want to look at DataStructures.jl which has a SortedDict struct, which will handle this for you.

8 Likes