get json object without array name in android 2 -
i've json this
array ( 'status' => 'ok', 'categories' => array ( 'sepeda' => array ( 83 => 'sepeda mtb', 'fullbike' => array ( 370 => 'mtb', 371 => 'roadbike', 374 => 'fixie', 375 => 'sepeda lipat', 378 => 'city bike', 380 => 'bmx', 382 => 'onthel', ),
that wanna ask , how code "fullbike" ?? advice , need , thanks
try { //get full bike json object first jsonobject jsonobject = response.getjsonobject("categories").getjsonobject("sepeda").getjsonobject("fullbike"); //get inner values string mtb = jsonobject.getstring("370"); log.e("response", mtb); } catch (jsonexception e) { e.printstacktrace(); }
Comments
Post a Comment