Wednesday, 11 September 2013

how to access the json array in following format

how to access the json array in following format

i am trying to accessthe json data from server, i have accessed the first
json array from file but i dont know how to access the another json array
from that file. any help would be appreciated. my url of json file is as
follows String jsonurl" = "http:// 66.7.207.5
/homebites/list_business_category.php?b_id=18";"
i have accessed json array "business" as follows,
json_object_main = json_parser.getJSONObjectFromUrl(jsonurl
+ res_id);
Log.i("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", json_object_main + "");
if (json_object_main != null) {
try {
JSONArray json_array_header = json_object_main
.getJSONArray("business");
JSONArray j=json_object_main.getJSONArray("business_cat");
//JSONArray
json_cat=json_parser.getJsonArayFromUrl(jsonurl+res_id);
now i want to access json array "business_cat"
how can i?

No comments:

Post a Comment