这个问题自己查阅 改造了下 搞定了 jsonArray 转成map类型的list 通过stream 判断key值 是否匹配 ture 则保留 false stream会通过filter过滤
List> mapListJson = (List)jsonArray;
List> mapListJson = (List)AllFiledheadlist;
for(int i=0;i
Map map =mapListJson.get(i).entrySet().stream().filter((e) -> checkValue(e.getKey(),permisson_filed)).collect(Collectors.toMap((e) -> (String) e.getKey(), (e) -> e.getValue()));
fieldList.add(map);
}
private static boolean checkValue(Object object,ArrayList permisson_filed){
System.out.println(object);
if (permisson_filed.contains(object)) {
return true;
}else{
return false;
}
}