[Solved] How to parse my JSON String in Android? [duplicate]


Basically ‘[]’ this represent as JSONArray and ‘{}’ this represent JSONObject

 try {
        JSONArray jsonArray = new JSONArray(response);
        for(int i=0; i<jsonArray.length(); i++){
            JSONObject jsonObject = jsonArray.getJSONObject(i);

            String id = jsonObject.getString("id");
            String name = jsonObject.getString("name");
            String surname = jsonObject.getString("surname");
            String il = jsonObject.getString("il");
        }
    } catch (JSONException e) {
        e.printStackTrace();
    }

2

solved How to parse my JSON String in Android? [duplicate]