I have a response like this:
{ \"songs\":{ \"2562862600\":{\"id\":\"2562862600\"\"pos\":1}, \"2562862620\":{\"id\":\"2562862620\"\"pos\"
Something like this:
JSONObject songs= json.getJSONObject("songs"); Iterator x = songs.keys(); JSONArray jsonArray = new JSONArray(); while (x.hasNext()){ String key = (String) x.next(); jsonArray.put(songs.get(key)); }