title: How to parse a 2D json array
body: <p>Hello I'm new to android studio and I'm currently trying to figure out how to parse this json file: <a href="http://stman1.cs.unh.edu:6191/games" rel="nofollow noreferrer">http://stman1.cs.unh.edu:6191/games</a> into a 2d array. I can't seem to figure out a simple way of doing this.</p>
  
  <p>I'm not sure exactly why object types are returned by the JsonObject. I know it can't be converted to an int because it's likely an array of ints but I also can't get that array because it doesn't have a name like the outer array.</p>
  
  <pre><code>public void onResponse(JSONObject response) {
     try {
        JSONArray jsonArray = response.getJSONArray("grid");
  
        for( int i=0; i &lt; jsonArray.length(); i++ ){
            JSONObject num = jsonArray.getJSONObject(i);
            gridVals[i] = num.getInt();
        }
  
     } catch (JSONException e) {
        e.printStackTrace();
     }
  }
  </code></pre>