title: Parsing data to create a json data object with Python
body: <p>Here is my data from google bigquery to parse:</p>
  
  <pre><code>{
      u'kind': u'bigquery#queryResponse',
      u'rows': [
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'995'
                  },
                  {
                      u'v': u'1600'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'942'
                  },
                  {
                      u'v': u'1607'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'937'
                  },
                  {
                      u'v': u'1599'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'894'
                  },
                  {
                      u'v': u'1598'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'848'
                  },
                  {
                      u'v': u'1592'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'841'
                  },
                  {
                      u'v': u'1590'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'786'
                  },
                  {
                      u'v': u'1603'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'779'
                  },
                  {
                      u'v': u'1609'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'762'
                  },
                  {
                      u'v': u'1597'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'753'
                  },
                  {
                      u'v': u'1594'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'740'
                  },
                  {
                      u'v': u'1596'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'738'
                  },
                  {
                      u'v': u'1612'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'718'
                  },
                  {
                      u'v': u'1590'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'717'
                  },
                  {
                      u'v': u'1610'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'715'
                  },
                  {
                      u'v': u'1602'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'680'
                  },
                  {
                      u'v': u'1606'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'674'
                  },
                  {
                      u'v': u'1603'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'639'
                  },
                  {
                      u'v': u'1603'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'637'
                  },
                  {
                      u'v': u'1603'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'634'
                  },
                  {
                      u'v': u'1590'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'633'
                  },
                  {
                      u'v': u'1599'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'616'
                  },
                  {
                      u'v': u'1596'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'614'
                  },
                  {
                      u'v': u'1596'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'612'
                  },
                  {
                      u'v': u'1595'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'607'
                  },
                  {
                      u'v': u'1603'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'579'
                  },
                  {
                      u'v': u'1593'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'570'
                  },
                  {
                      u'v': u'1600'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'541'
                  },
                  {
                      u'v': u'1599'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'525'
                  },
                  {
                      u'v': u'1608'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'520'
                  },
                  {
                      u'v': u'1599'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'518'
                  },
                  {
                      u'v': u'1602'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'486'
                  },
                  {
                      u'v': u'1595'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'470'
                  },
                  {
                      u'v': u'1593'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'433'
                  },
                  {
                      u'v': u'1609'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'429'
                  },
                  {
                      u'v': u'1607'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'421'
                  },
                  {
                      u'v': u'1611'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'399'
                  },
                  {
                      u'v': u'1592'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'363'
                  },
                  {
                      u'v': u'0'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'353'
                  },
                  {
                      u'v': u'1594'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'287'
                  },
                  {
                      u'v': u'1609'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'106'
                  },
                  {
                      u'v': u'0'
                  }
              ]
          },
          {
              u'f': [
                  {
                      u'v': u'the'
                  },
                  {
                      u'v': u'57'
                  },
                  {
                      u'v': u'1609'
                  }
              ]
          }
      ],
      u'jobReference': {
          u'projectId': u'670640819051',
          u'jobId': u'job_5bf745fcee8b470e997d8ea90f380e68'
      },
      u'jobComplete': True,
      u'totalRows': u'42',
      u'schema': {
          u'fields': [
              {
                  u'type': u'STRING',
                  u'name': u'word',
                  u'mode': u'NULLABLE'
              },
              {
                  u'type': u'INTEGER',
                  u'name': u'word_count',
                  u'mode': u'NULLABLE'
              },
              {
                  u'type': u'INTEGER',
                  u'name': u'corpus_date',
                  u'mode': u'NULLABLE'
              }
          ]
      }
  }
  </code></pre>
  
  <p>Being a Python newbee, I really have no idea about how to go about parsing this data to create a json object like below:</p>
  
  <pre><code>[
       {'count': 200, 'year': 2008},
       {'count': 240, 'year': 2010},
       {'count': 290, 'year': 2009}
  ]
  </code></pre>
  
  <p>Can any one give me any hint about how to get started?</p>
  
  <p><strong>Example</strong> </p>
  
  <pre><code>[{u'v': u'the'}, {u'v': u'995'}, {u'v': u'1600'}]
  </code></pre>
  
  <p>In this for the word <code>'the'</code>, <code>count</code> is 995 and <code>year</code> is 1600. And so it follows.</p>