public static List<Map<String, Object>> transformUpperCase(List<Map<String, Object>> list) {
for (int i = 0;i < list.size(); i++){
Map<String, Object> resultMap = new HashMap<>();
Map<String, Object> map = list.get(i);
if (map == null || map.isEmpty()) {
return list;
}
Set<String> keySet = map.keySet();[code=java][/code]
for (String key : keySet) {
String newKey = key.toLowerCase();
newKey = newKey.replace("_", "");
resultMap.put(newKey, map.get(key));
}
list.set(i,resultMap);
}
return list;
}
用到了就记录一下吧~~
原贴地址:https://blog.csdn.net/qq_36421955/article/details/80847018