title: Python Json. Getting only the last element in the json array
body: <p>I just started trying out python, and right now i am in a little bit of a dilemma.</p>
  
  <p>I am trying to print from a json documents, and i am only getting the last element in the array.</p>
  
  <pre><code>[{
      "FullMeasure": "1/2 cup", 
      "FullWeight": "", 
      "IngredientGridHeaders": null, 
      "IngredientID": 1142, 
      "IngredientName": "frozen corn", 
      "IngredientStep": 10, 
      "LanguageId": 0, 
      "PostPreparation": ", thawed, drained", 
      "PrePreparation": "", 
      "QuantityNum": 0, 
      "QuantityText": "1/2", 
      "QuantityUnit": "cup", 
      "RecipeIngredientID": 6291555, 
      "TrialMeasure": "", 
      "TrialWeight": ""
    }, 
    {
      "FullMeasure": "1/4 cup", 
      "FullWeight": "", 
      "IngredientGridHeaders": null, 
      "IngredientID": 1523, 
      "IngredientName": "red pepper", 
      "IngredientStep": 20, 
      "LanguageId": 0, 
      "PostPreparation": "s", 
      "PrePreparation": "chopped", 
      "QuantityNum": 0, 
      "QuantityText": "1/4", 
      "QuantityUnit": "cup", 
      "RecipeIngredientID": 6291554, 
      "TrialMeasure": "", 
      "TrialWeight": ""
    }, 
    {
      "FullMeasure": "2 Tbsp.", 
      "FullWeight": "", 
      "IngredientGridHeaders": null, 
      "IngredientID": 20197, 
      "IngredientName": "chopped green chiles", 
      "IngredientStep": 30, 
      "LanguageId": 0, 
      "PostPreparation": ", drained", 
      "PrePreparation": "canned ", 
      "QuantityNum": 2, 
      "QuantityText": "2", 
      "QuantityUnit": "Tbsp.", 
      "RecipeIngredientID": 6291552, 
      "TrialMeasure": "", 
      "TrialWeight": ""
    },
  {
      "FullMeasure": "", 
      "FullWeight": "", 
      "IngredientGridHeaders": null, 
      "IngredientID": 19682, 
      "IngredientName": "KRAFT DELI DELUXE Process American Cheese Slice", 
      "IngredientStep": 80, 
      "LanguageId": 0, 
      "PostPreparation": "s", 
      "PrePreparation": "", 
      "QuantityNum": 4, 
      "QuantityText": "4", 
      "QuantityUnit": "", 
      "RecipeIngredientID": 6291558, 
      "TrialMeasure": "", 
      "TrialWeight": ""
    }
  ]
  </code></pre>
  
  <p>I will like to get all the  ingredientID, so i wrote this little piece of code to grab the IngredientID</p>
  
  <pre><code>rec = recipes['Recipes'][0]['Ingredients']
          for records in rec:
              value = {
                          'Ingredient ID': records['IngredientID']
                      }
  </code></pre>
  
  <p>when i return the value, i get </p>
  
  <pre><code>{
    "Ingreient ID": 19682
  }
  </code></pre>
  
  <p>I am trying to get the ingredient ID of each element and i just can't seem to figure it out. Any pointers will be well appreciated. Thank you</p>