↧
Answer by lewis machilika for Loop through nested JSON array
You may try public void printJsonObject(JSONObject jsonObj) { for (String keyStr : jsonObj.keySet()) { Object keyvalue = jsonObj.get(keyStr); //Print key and value System.out.println("key: "+ keyStr +"...
View ArticleAnswer by ramin bakhshpour for Loop through nested JSON array
you need a recursive function.function iterateTree(object) { if (!object) { //recursion stop criteria || you need to implement what your stop criteria is return; } //doSomthingWithObject();...
View ArticleLoop through nested JSON array
I have a JSON response that looks like this:{"1":{"id":"1","user_id":"1","children":[ {"id":"2","user_id":"2","children":[ {"id":"3","user_id":"3","children":[ {"id":"4","user_id":"2","children":[ ] }...
View Article
More Pages to Explore .....