java获取对象的key和value
JSONObject res_data= body.getJSONObject("data"); Iterator sIterator = res_data.keySet().iterator(); while(sIterator.hasNext()){ Object key=sIterator.next(); //循环遍历每个key res_data.getString("key"); //获取key里的value }
JSONObject res_data= body.getJSONObject("data"); Iterator sIterator = res_data.keySet().iterator(); while(sIterator.hasNext()){ Object key=sIterator.next(); //循环遍历每个key res_data.getString("key"); //获取key里的value }