java - extract from a multiple json -
i have json this:
[{"id":"****","value":"*****","date":"****"}, {"id":"****","value":"*****","date":"****"}, {"id":"****","value":"*****","date":"****"}, {"id":"****","value":"*****","date":"****"}]
every "sub-json" want convert model object.(an object contains attributes id value , date). how can it? thank you.
you got array of objects.
jsonarray jsonarray = new jsonarray(jsonstr); (int = 0; < jsonarray.length(); i++) { jsonobject jsonobject = jsonarray.getjsonobject(i); string id = jsonobject.getstring("id"); string value = jsonobject.getstring("value"); }
Comments
Post a Comment