title: filtering a text file with a certain string in a line then returning another string within the line
body: <p>this is my text file named team.json
  my problem is that I only know how to return a specific line,
  For example i select a filter location, like PQ how would i return the names that has a PQ location. thanks in advance.</p>
  
  <pre><code>{
    "members": [
      {"name": "John", "location": "QC", "age": 25},
      {"name": "Jesse", "location": "PQ", "age": 24},
      {"name": "Jez", "location": "PQ", "age": 23},
      {"name": "Ry", "location": "PQ", "age": 22},
      {"name": "Barry", "location": "PQ", "age": 25},
      {"name": "Rikki", "location": "PQ", "age": 35},
      {"name": "Ross", "location": "PQ", "age": 33},
      {"name": "Chiz", "location": "PQ", "age": 25},
      {"name": "Gel", "location": "PQ", "age": 24},
      {"name": "Cherry", "location": "PQ", "age": 22}
    ]
  }
  </code></pre>
  
  <p>this is my code but only returns the line</p>
  
  <pre><code>import json
  my_data = json.loads(open("team.json.txt").read())
  
  print my_data
  
  for line in open('team.json.txt'):
   if "John" in line:
    print line
  </code></pre>