code: private List<MapRow> sort(List<MapRow> rows, final String attribute)
     {
        Collections.sort(rows, new Comparator<MapRow>()
        {
           @Override public int compare(MapRow o1, MapRow o2)
           {
              String value1 = o1.getString(attribute);
              String value2 = o2.getString(attribute);
              return value1.compareTo(value2);
           }
        });
        return rows;
     }
docs: Sort MapRows based on a named attribute.
  
  @param rows map rows to sort
  @param attribute attribute to sort on
  @return list argument (allows method chaining)