title: How to get a fields particular value of JSON in python?
body: <p>I am currently working on extracting fields from json and then make some use of that. Hence I have face parameters, and I want to store each field's value. I am trying to fetch the Gender value from a JSON of face :
  The JSON is as follows:</p>
  
  <pre><code>{
    "face": [
      {
        "attribute": {
          "age": {
            "range": 5,
            "value": 24
          },
          "gender": {
            "confidence": 99.9999,
            "value": "Female"
          },
          "glass": {
            "confidence": 99.4157,
            "value": "None"
          },
          "pose": {
            "pitch_angle": {
              "value": 0.000001
            },
            "roll_angle": {
              "value": 0.650337
            },
            "yaw_angle": {
              "value": -0.42409
            }
          },
          "race": {
            "confidence": 98.058,
            "value": "Asian"
          },
          "smiling": {
            "value": 3.78394
          }
        },
        "face_id": "42245f24335ad21ea7c54f2db96a09b3",
        "position": {
          "center": {
            "x": 50.121951,
            "y": 35.97561
          },
          "eye_left": {
            "x": 43.465122,
            "y": 30.670488
          },
          "eye_right": {
            "x": 56.80878,
            "y": 30.821951
          },
          "height": 27.560976,
          "mouth_left": {
            "x": 45.649512,
            "y": 45.041707
          },
          "mouth_right": {
            "x": 55.134878,
            "y": 44.858049
          },
          "nose": {
            "x": 50.183415,
            "y": 38.410732
          },
          "width": 27.560976
        },
        "tag": ""
      }
    ],
    "img_height": 410,
    "img_id": "1e3007cb3d6cfbaed3a1b4135524ed25",
    "img_width": 410,
    "session_id": "76ec7f99a471418fa8862a2138cc589d",
    "url": "http://www.faceplusplus.com/wp-content/themes/faceplusplus/assets/img/demo/1.jpg?v=2"
  }
  </code></pre>
  
  <p>I want to extract 'Female' from the above json.
  And for that, I used this : </p>
  
  <pre><code> import urllib2
   import io, json
   from bs4 import BeautifulSoup
   data = soup #soup has all the data json
   with open('data.json', 'w') as outfile:
       json.dump(data, outfile, sort_keys = True, indent = 4, ensure_ascii=False)
   #content = json.loads(soup)
   jsonFile = open('data.json', 'r')
   values = json.load(jsonFile)
   jsonFile.close()
   gender = soup['face'][0]['gender']['value']
   print gender
  </code></pre>
  
  <p>Where is my code incorrect?</p>