title: Python sort nested dictionaries by value descending
body: <p>I have a dictionary something looks like this</p>
  
  <pre><code>{
  'Host-A': {'requests': 
      {'GET /index.php/dashboard HTTP/1.0': {'code': '200', 'hit_count': 3},
       'GET /index.php/cronjob HTTP/1.0': {'code': '200', 'hit_count': 4},
       'GET /index.php/setup HTTP/1.0': {'code': '200', 'hit_count': 2}},
  'total_hit_count': 9},
  }
  </code></pre>
  
  <p>as you can see for <code>'Host-A'</code> the value is a dict contains requests received and hits count on each page.. the question is how to sort the <code>'requests'</code> in descending order. so then I can get the top requests .</p>
  
  <p>example of correct solution output would be like:</p>
  
  <pre><code>{
  'Host-A': {'requests':
      {'GET /index.php/cronjob HTTP/1.0': {'code': '200', 'hit_count': 4},
       'GET /index.php/dashboard HTTP/1.0': {'code': '200', 'hit_count': 3},
       'GET /index.php/setup HTTP/1.0': {'code': '200', 'hit_count': 2}},
  'total_hit_count': 9},
  }
  </code></pre>
  
  <p>I appreciate your help</p>