Android: Iterate a JSONArray


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  1. JSONArray ar = new JSONArray(jsonString);
  2. for (int i = 0; i < ar.length(); i++) {
  3. JSONObject child = ar.getJSONObject(i);
  4. // do stuff with child
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.