title: Accessing a key value pairs in a JsonResponse in Django Unit Testing
body: <p>I want to access the data returned in the following jsonResponse object:</p>
  
  <pre><code>{"results": [[1, "Probability and Stochastic Processes", 9781118324561, "Roy D. Yates", "2014-01-01", "Wiley"], [2, "Interaction Design", 9781119020752, "Rogers Price", "2015-01-01", "John Wiley &amp; Sons"], [3, "Microeconomics", 9780077501808, "Colander", "2013-01-01", "McGraw Hill"], [4, "jfalksdjf", 123123, "test", "1990-01-01", "Penguin"]]}
  </code></pre>
  
  <p>I am running into trouble however and I have tried many things</p>
  
  <pre><code>def test_noIDGiven(self):
      response = self.client.get(reverse('allTextbooks')) #returns the json array above
      #check that there are three textbooks in the response
      #print(response.content['results'][0][0]) - this didnt work
      self.assertEquals(response.content[0][0], 1) #basically want to access the id of the first object and make sure it is 1
  </code></pre>
  
  <p>Any help on how the best way to go about accessing the key value pairs of this object would be nice. thanks in advance</p>
  
  <p>More information:
  - when i reverse 'allTextbooks' the api call returns this:</p>
  
  <pre><code>results = list(Textbook.objects.values_list())
  return JsonResponse({'results': results})
  </code></pre>