title: Adding JSON data to arrayList
body: <p>Still working on this part of my script to parse my JSON <code>jsonArray = new JSONArray(jsonData);</code> and then adding it to a arraylist "myJSONArray"  </p>
  
  <p>I am not sure how the for loop would work to add my elements from jsonArray into myJSONArray (arrayList)</p>
  
  <p>If I am not clear please let me know and if there is any info I am missing just ask. Thanks in advance.</p>
  
  <p>JSON data:</p>
  
  <pre><code>{"id":["1","2","3"],"name":["Dragon","Butterfly","Tattoo"],"thumb":["thm_polaroid.jpg","thm_default.jpg","thm_enhanced-buzz-9667-1270841394-4.jpg"],"path":["polaroid.jpg","default.jpg","enhanced-buzz-9667-1270841394-4.jpg"]}
  </code></pre>
  
  <p>image_data class:</p>
  
  <pre><code>public class image_data {
  
  
      public int id;
      public String name;
      public String thumb;
      public String path;
  
  
  }
  </code></pre>
  
  <p>ShowThumb class:</p>
  
  <pre><code>public class showThumb extends Activity{
  
  
  
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.gridlayout);
  
           Bundle bundle = getIntent().getExtras();
           String jsonData = bundle.getString("jsonData");
  
  
           JSONArray jsonArray = null;
          try {
              jsonArray = new JSONArray(jsonData);
          } catch (JSONException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  
          ArrayList&lt;image_data&gt; myJSONArray = new ArrayList&lt;image_data&gt;();
  
           for (int i=0; i&lt;jsonArray.length(); i++) {
                 **//This is where I think I create the seperate arrays of id name thumb and path**
               myJSONArray.add(new image_data());
  
           }
  
  
  GridView gridview = (GridView) findViewById(R.id.gridview);
          gridview.setAdapter(new ImageAdapter(this,image_data));
  
      }
  }
  </code></pre>