title: How do I sort a dictionary by value?
body: <p>I have a dictionary of values read from two fields in a database: a string field and a numeric field. The string field is unique, so that is the key of the dictionary.</p>
  
  <p>I can sort on the keys, but how can I sort based on the values?</p>
  
  <p>Note: I have read Stack Overflow question here <em><a href="https://stackoverflow.com/questions/72899">How do I sort a list of dictionaries by a value of the dictionary?</a></em> and probably could change my code to have a list of dictionaries, but since I do not really need a list of dictionaries I wanted to know if there is a simpler solution to sort either in ascending or descending order.</p>