List is sorted according to a certain value of Map String, Object

List<Map<String, String> resultList = new ArrayList<>();

        resultList.sort((o1, o2) -> {
            String key1 = o1.get("time");
            String key2 = o2.get("time");
            return key1.compareTo(key2);
        });

As above, sort according to the value corresponding to time in the map

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324779342&siteId=291194637