[java] map to json (json 키를 대문자에서 소문자로 변환)
List covList = new ArrayList(); // 리스트 Map LowerKeyMap = new HashMap(); //소문자 맵 //리스트 포문 돌려서 키만 소문자로 변환해서 새로운 리스트에 넣어주기 for (Map map : List) { for (Map.Entry entry : map.entrySet()) { LowerKeyMap.put(entry.getKey().toLowerCase(), entry.getValue()); } covList.add(LowerKeyMap); }
Programming/Spring
2023. 2. 8. 15:20
반응형