title: Android create a JSON array of JSON Objects
body: <p>hi does anyone know how to create a Array that contains objects that in each objects contain several objects? i just can't seem to get my head round it</p>
  
  <p>the structure should look like this</p>
  
  <pre><code>Array{[object]{subobject,subobject}
        [object]{subobject,subobject}
       }
  </code></pre>
  
  <p>heres what i have so far</p>
  
  <pre><code>JSONObject obj = new JSONObject(json2);    
              JSONObject objData = obj.getJSONObject("data");
              fixturesArray = objData.getJSONArray("fixtures");
  
              JSONArray FixArray = new JSONArray();
  
  
              for(int t = 0; t &lt; fixturesArray.length(); t++){
              JSONObject fixObj = fixturesArray.getJSONObject(t);
              String Matchdate = fixObj.getString("matchdate");
              JSONObject DateObj = DateObj.put(Matchdate, DateObj);
  </code></pre>
  
  <p>heres my JSON essentially what i have if is a feed of fixtures i need to order them in to arrays of dates</p>
  
  <pre><code>{
      "code":200,
      "error":null,
      "data":{
          "fixtures":[
              {
                  "kickoff":"15:00:00",
                  "matchdate":"2012-07-28",
                  "homescore":null,
                  "awayscore":null,
                  "attendance":null,
                  "homepens":null,
                  "awaypens":null,
                  "division_id":"5059",
                  "division":"Testing 1",
                  "comp":"LGE",
                  "location":null,
                  "fixture_note":null,
                  "hometeam_id":"64930",
                  "hometeam":"Team 1",
                  "awayteam_id":"64931",
                  "awayteam":"Team 2"
              }, {
                  "kickoff":"15:00:00",
                  "matchdate":"2012-07-28",
                  "homescore":null,
                  "awayscore":null,
                  "attendance":null,
                  "homepens":null,
                  "awaypens":null,
                  "division_id":"5059",
                  "division":"Testing 1",
                  "comp":"LGE",
                  "location":null,
                  "fixture_note":null,
                  "hometeam_id":"64930",
                  "hometeam":"Team 1",
                  "awayteam_id":"64931",
                  "awayteam":"Team 2"
              }
          ]
      }
  }
  </code></pre>