title: Sorting a JSON Object
body: <p>I'm new to JSON and Python, and I'm attempting to load a json file that I created from disk to manipulate and output to an xml file.  I've gotten most of it figured out, except, I want to 'sort' the JSON file after I load it by a certain value.</p>
  
  <p>Example of json file:</p>
  
  <pre><code>{
     "0" : {
       "name": "John Doe",
       "finished": "4",
       "logo": "http://someurl.com/icon.png"
     },
     "1" : {
       "name": "Jane Doe",
       "finished": "10",
       "logo": "http://anotherurl.com/icon.png"
     },
     "2" : {
       "name": "Jacob Smith",
       "finished": "3",
       "logo": "http://example.com/icon.png"
     }
  }
  </code></pre>
  
  <p>What I want to do is sort 'tree' by the 'finished' key. </p>
  
  <pre><code>JSONFILE = "file.json"
  
  with open(CHANS) as json_file:
      tree = json.load(json_file)
  </code></pre>