Suppose I have a JSON array like this:
[
{
\"id\": \"429d30a1-9364-4d9a-92e0-a17e00b3afba\",
\"children\": [],
\"parentid\": \"\"
Based on Stefan Jansen's answer I made some changes and this is what I have now:
nestedChildren declared globaly, and before the children are searched reset to new ArrayList()
private void findAllChild(JSONArray array) throws JSONException {
for ( int i=0;i 0 ) {
findAllChild(json_array);
}
}
}
This assumes it is all Arrays, witch in my case it is