Sort custom dictionary.