方式一:Java8 遍历 JSONArray List list = null; if(array != null) { list = array.stream().filter(item ->{ JSONObject object = (JSONObject)item; String code = object.getString("code"); return Pattern.matches("^[\\s\\S]*0000$", code); }).map(item ->{ return (JSONObject…