title: Python filter and map json
body: <p>I'm working on my home project and I tried to use filter and map functions to get the json values as I needed. I need to get the key and value that is related to the project.</p>
  
  <p>No need to use <code>boto3</code>. Maybe comprehension list but prefers to stay within filter and map. Just wanted to see if anyone has success with multiple filter-map within one line.</p>
  
  <p>I'm having issue with indices. As you can see <code>i[0]['Key']</code> gives me the first index, not the rest. Should be <code>0, 1, 2, 3 index etc.</code>  </p>
  
  <pre><code>   {
      "Vpcs": [
          {
              "VpcId": "vpc-12345678", 
              "InstanceId": "i-0000111",
              "Tags": [
                  {
                      "Value": "Hey", 
                      "Key": "Project"
                  },
                  {
                      "Value": "adsf", 
                      "Key": "lol"
                  }
              ]
          },
          {
              "VpcId": "vpc-0001111", 
              "InstanceId": "i-0000111",
              "Tags": [
                  {
                      "Value": "hehe", 
                      "Key": "oops"
                  },
                  {
                      "Value": "Hi", 
                      "Key": "Project"
                  }
              ]
          }
      ]
  }
  </code></pre>
  
  <pre class="lang-py prettyprint-override"><code>import json
  
  with open('test.json') as json_file:
       data = json.load(json_file)
  
  
  h = filter(lambda i: i[0]['Key'] == "Project", filter(lambda x: x[0]['Key'], map(lambda y: y['Tags'], data['Vpcs'])))
  
  print(h)
  </code></pre>
  
  <p>What I got the result is: </p>
  
  <pre><code>[[{u'Key': u'Project', u'Value': u'Hey'}, {u'Key': u'lol', u'Value': u'adsf'}]]
  </code></pre>
  
  <p>should be: </p>
  
  <pre><code>[[{u'Key': u'Project', u'Value':'Hey'}][{u'Key': u'Project', u'Value': u'Hi'}]]   
  </code></pre>