title: Find string within JSON with Python
body: <p>I'm currently getting a very long JSON and I'm trying to pick out 2 pieces of information from it through Python 2.7.</p>
  
  <p>The JSON looks roughly like this:</p>
  
  <pre><code>{
    'device': [
      {
        'serial': '00000000762c1d3c',
        'registered_id': '019'
      },
      {
        'serial': '000000003ad192f2',
        'registered_id': '045'
      },
      {
        'serial': '000000004c9898aa',
        'registered_id': '027'
      }
    ],
  }
  </code></pre>
  
  <p>Within this JSON I'm looking for a specific serial that might match with one in the JSON. If it does, it should print out the registered_id as well.</p>
  
  <p>I've tried using a simple script, even without the registered_id but I'm getting nowhere.:</p>
  
  <pre><code>if '00000000762c1d3c' not in data['device']:
          print 'not there'
  else:
          print 'there'
  </code></pre>
  
  <p>Thanks for your suggestions!</p>