title: Parse foursquare json response on android
body: <p>I am trying to parse the JSON file returned by Foursquare API on android.The JSON fle starts like this:</p>
  
  <pre><code>{"meta":{"code":200},"response":{"groups":[{"type":"places","name":"Matching Places","items":[{"id":"4bc5b8056936952188618488","name":"Boots Clifton Down","contact":{},
  </code></pre>
  
  <p>and here is my function so far:</p>
  
  <pre><code>    private void tokenize(String output){   
          try {
              JSONObject json = new JSONObject(output);
              JSONArray venues = json.getJSONObject("response").getJSONObject("groups").getJSONArray("items");
              System.out.println(venues.length());
          } catch (JSONException e) {
              e.printStackTrace();
          }
  
     }
  </code></pre>
  
  <p>I tried replacing</p>
  
  <pre><code>JSONArray venues = json.getJSONObject("response").getJSONObject("groups").getJSONArray("items");
  </code></pre>
  
  <p>with </p>
  
  <pre><code>JSONArray venues = json.getJSONObject("response").getJSONArray("groups").getJSONArray("items");
  </code></pre>
  
  <p>but I keep getting</p>
  
  <pre><code>org.json.JSON.typeMismatch(JSON.java:96)
  </code></pre>
  
  <p>I am trying to create a JSONArray from the <code>items</code> array. How can I accomplish this? </p>
  
  <p>Thanks in advance</p>