title: Python: Find smallest values in nested dict
body: <p>Python 2.7</p>
  
  <p>This is a variation on <a href="https://stackoverflow.com/questions/9944963/python-get-key-with-the-least-value-from-a-dictionary-but-multiple-minimum-valu">Python: get key with the least value from a dictionary BUT multiple minimum values</a></p>
  
  <p>I have a dictionary that looks like this:</p>
  
  <pre><code>dates = {
      'first record': {
          'first date': '1985',
          'last date': '2000',
          },
      'second record': {
          'first date': '1985',
          'last date': '2012',
          },
      'third record': {
          'first date': '1985',
          'last date': '2000',
          },
      'fourth record': {
          'first date': '2000',
          'last date': '2014',
          }
  }
  </code></pre>
  
  <p>I am trying to retrieve the key(s) of the oldest record(s), where oldest means the earliest first date and earliest last date. In the above example, 'first record' and 'third record' would both be returned.</p>
  
  <p>I'm having a hard time figuring out how to implement a solution using the itervalues/iteritems approach described in answers to similar (but less complex) questions. Could anyone offer some guidance?</p>