title: Finding and updating field in nested dict in Python
body: <p>I have a dict like so:</p>
  
  <pre><code>mobs = {
      'world': {
          0: {'mID': 255, 'xPos': 29, 'yPos': 45}
          1: {'mID': 784, 'xPos': 34, 'yPos': 84}
          }, 
      'village': {
          0: {'mID': 256, 'xPos': 77, 'yPos': 25}
          1: {'mID': 67, 'xPos': 92, 'yPos': 16}
          2: {'mID': 998, 'xPos': 8, 'yPos': 5}
          }, 
      }
  </code></pre>
  
  <p>I want to increment the <code>xPos</code> where <code>mID</code> = x in the 'world' dict, but not sure how to point to it</p>
  
  <p>Do I have to loop through each record in <code>world</code> and check <code>if mID = x</code>, or is there a quicker way?</p>
  
  <p>(updated)</p>
  
  <pre><code>x = 784
  for row in mobs['world']:
      if mobs['world'][row]['ID'] == x:
          mobs['world'][row]['xPos'] -= 1
  </code></pre>