I am calling a web service using **AsyncTask** as shown:

**in doInBackground() method:**

```
            HttpClient httpClient=new DefaultHttpClient();
            HttpGet httpGet=new HttpGet(URL);
            HttpResponse httpResponse=httpClient.execute(httpGet);
            HttpEntity httpEntity=httpResponse.getEntity();
            Response=EntityUtils.toString(httpEntity);

```

**in postExecute() method:**

```
            JSONObject jsonObject=new JSONObject(Response);
            JSONArray jsonArray=jsonObject.getJSONArray("Table");

            JSONObject jsonObject1=jsonArray.getJSONObject(1);
            JSONObject jsonObject2=jsonArray.getJSONObject(2);
            JSONObject jsonObject3=jsonArray.getJSONObject(3);
            JSONObject jsonObject4=jsonArray.getJSONObject(4);
            JSONObject jsonObject5=jsonArray.getJSONObject(5);
            JSONObject jsonObject6=jsonArray.getJSONObject(6);
            JSONObject jsonObject7=jsonArray.getJSONObject(7);
            JSONObject jsonObject8=jsonArray.getJSONObject(8);
            JSONObject jsonObject9=jsonArray.getJSONObject(9);
            JSONObject jsonObject10=jsonArray.getJSONObject(10);

```

I don't want all the data from the Response, only two values say **Name** and **Subject** 

```
String textView1[]={jsonObject1.getString("Name"), jsonObject2.getString("Name"), jsonObject3.getString("Name"), jsonObject4.getString("Name"), jsonObject5.getString("Name"),jsonObject6.getString("Name"),jsonObject7.getString("Name"),jsonObject8.getString("Name"),jsonObject9.getString("Name"),jsonObject10.getString("Name"),jsonObject11.getString("Name"),jsonObject12.getString("Name")};

String textView2[]={jsonObject1.getString("Subject"), jsonObject2.getString("Subject"), jsonObject3.getString("Subject"), jsonObject4.getString("Subject"), jsonObject5.getString("Subject"),jsonObject6.getString("Subject"),jsonObject7.getString("Subject"),jsonObject8.getString("Subject"),jsonObject9.getString("Subject"),jsonObject10.getString("Subject"),jsonObject11.getString("Subject"),jsonObject12.getString("Subject")};

```

All this data iam binding to a list.

This way i cannot load 100 values, How to store dynamically? Or how to loop? How to use ArrayList??

Any help??