How can I sort a List of Map using Java 8? The map contains a key called last_name, and the value associated wit
List
Map
last_name
It looks like you can rewrite your code like
peopleList.sort(Comparator.comparing( m -> m.get("yourKey"), Comparator.nullsLast(Comparator.naturalOrder())) )