in my app when i hit an url i am getting a return data as an json array. it is as follows
{"Status":[{ "img_path": "http://xxxxxxxxxxxxxx.com/images/thumb140/1316145577.jpg",
"img_path": "http://xxxxxxxxxxxxxx.com/images/thumb140/1316146270.jpg",
"img_path": "http://xxxxxxxxxxxxxx.com/images/thumb140/1316146473.jpg",
"img_path": "http://xxxxxxxxxxxxxx.com/images/thumb140/1316147003.jpg" } ]}
From the above result i am trying to parse out the urls and i am trying to store it in an array list. Following is my code
try{
JSONArray get_post_status = json.getJSONArray("Status");
for (int i = 0; i < get_post_status.length(); i++) {
JSONObject e = get_post_status.getJSONObject(i);
if(e.equals("img_path"))
{
Get_post_image_array.add(e.getString("img_path"));
}
}
But in my arraylist i am getting only the last url from the result. How to get all the urls in the arraylist.
Pls help me.......
example.comas an example host name?example.comis a reserved domain name, as specified in RFC 2606.