title: How to iterate on multi-level JSON in python
body: <p>Goal:
  Iterate over a sub-json looking in 2 keys for a specific string</p>
  
  <p>In PHP it's easy but for python 3, I cannot seems to find a proper way. I tried other solutions I found on the web but I always end up getting an error.</p>
  
  <p>Example JSON:</p>
  
  <pre><code>{
    "main1": {
      "sub1": {
        "prop1": "name1",
        "prop2": "name2"
      },
      "sub2": {
        "prop1": "name1",
        "prop2": "name2"
      },
    },
    "main2": {
      "sub1": {
        "prop1": "name1",
        "prop2": "name2"
      },
      "sub2": {
        "prop1": "name1",
        "prop2": "name2"
      },
    },
  }
  </code></pre>
  
  <p>Code</p>
  
  <pre><code>self.data = dataIO.load_json('data/data.json')
  
  for item in self.data['main1'].items():
    if item['prop1'] == 'name1' or item['prop2'] == 'name1':
      print 'found one'
  </code></pre>
  
  <p>Error:
  <code>TypeError: string indices must be integers</code></p>