Click here to Skip to main content
14,866,384 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Java
JSONParser jp = new JSONParser();
	JSONObject jo = jp.getJSONFromUrl(url);
	ja = jo.getJSONArray("id");
        for (int i = 0; i < ja.length(); i++)   
        {
								
	     stringArray.add(ja.getString(i));
	     
	}
Log.e("tag", stringArray.toString());


cannot get data in string array..
thnx in adv...
Posted
Comments
   
When you debug, is it going inside the for loop?
Sergey Alexandrovich Kryukov 27-Nov-13 13:15pm
   
To what array? What do you want to achieve?
—SA

1 solution

Java
JSONParser jp = new JSONParser();
	JSONObject jo = jp.getJSONFromUrl(url);
	Log.d("abc", jo.toString());
	ja = jo.getJSONArray("id");
	Log.e("jsonarray", ja.toString());

	for (int i = 0; i < ja.length(); i++) 
        {
								
	     stringArray.add(ja.getString(i).toString());
	}
Log.e("tag", stringArray.toString());



This is solution..
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900