title: How to parse json to get all values of a specific key within an array?
body: <p>I'm having trouble trying to get a list of values from a specific key inside an json array using python. Using the JSON example below, I am trying to create a list which consists only the values of the <code>name</code> key.
  Original JSON:</p>
  
  <pre><code>[
      {
          "id": 1,
          "name": "Bulbasaur",
          "type": [
              "grass",
              "poison"
          ]
      },
      {
          "id": 2,
          "name": "Ivysaur",
          "type": [
              "grass",
              "poison"
          ]
      }
  ]
  </code></pre>
  
  <p>Expected:</p>
  
  <pre><code>["Bulbasaur", "Ivysaur"]
  </code></pre>
  
  <p>Below is the code of my approach:</p>
  
  <pre><code>import json
  try:
      with open("./simple.json", 'r') as f:
          contents = json.load(f)
  except Exception as e:
      print(e)
  
  print(contents[:]["name"])
  </code></pre>
  
  <p>I'm trying to go to an approach where i don't need to loop every single index and append them, something like the code above. Is this approach possible using python' json library?</p>