1、效果图
2、核心代码
if(xueke != 0){
JSONArray clsJson = (JSONArray) jResult.get("stuScore");
for(int i = 0; i < clsJson.size();){
JSONObject scls = (JSONObject) clsJson.get(i);
long categoryId = Long.valueOf((scls.get("categoryId")).toString()) ;
if (categoryId != xueke){
clsJson.remove(i);
} else
i++;
}
jResult.put("stuScore", clsJson);
}