title: Python: Accessing elements from nested dictionaries a la SQL
body: <p>A simple question - but I haven't found the syntax answer to it yet. How do I select a sub-dictionary that has a specific key-value combination? Effectively, how I <code>select * where id='ABC'</code>?</p>
  
  <p><strong>Details:</strong></p>
  
  <p>I'm in Python and have created a nested dictionary. I need to pull information from the sub-dictionary where one of the sub-dictionary's key-values is blah. </p>
  
  <p>I've gotten the dictionary initialized and I can read elements of it, but I don't understand how I can call each sub-dictionary by a key value pair. So for example, </p>
  
  <pre><code>#json_data is a json object
  
  data={}
  for i in range(10):
     data[i]={'id':json_data[i]['id'],
        'stationName':json_data[i]['stationName'], 
        'numBikes':json_data[i]['numBikes']}
  </code></pre>
  
  <p>This gets my nested dictionary started. I can access data as <code>data[0]</code> and it will print out my sub-dictionary correctly. But since those indices don't mean anything since I can add/delete lines, I need to access it by a key-value. </p>
  
  <p>But how do I pull up the station name and number of bikes when the id equals "ABC"?</p>