[Solved] Parsing json data.how can i parse this json data?


There are a lot of Google results that would show this but it would be something like

JSONArray jsonArray = new JSONArray("[{"Trip":{"id":"1","trip_start":"2016-05-22 17:20:06","trip_end":"2016-05-22 17:22:19"}}]");
JSONObject jsonObject = jsonArray.getJSONObject(0);

JSONObject tripObject = jsonObject.getJSONObject("Trip");

Log.d("JSONResponse", "ID: " + tripObject.getString("id"));

Hope this helps

5

solved Parsing json data.how can i parse this json data?