利用
List<java.util.Map<String,Object>> charData = (List<java.util.Map<String, Object>>) map.get("data");
The obtained chartData is
[{TIME21=0, TIME22=2, TIME23=0, TIME12=0, TIME13=1, TIME10=0, TIME20=0, TIME11=1, TIME17=0, TIME9=2, TIME16=0, TIME15=0, TIME14=1, TIME5=0, TIME6=0, TIME19=0, TIME7=0, TIME18=1, TIME8=4, TIME1=0, TIME2=0, TIME3=0, TIME4=0, TIME0=0}]
Now we need to sort her so that the order is TIME1, TIME2... this order, how should we sort it?
The problem should be to sort the keys in the Map. You can use Treemap, because the structure of the key is string+int, and it is sorted according to int, so you may need to write a comparator yourself.
Rough code, the comparator is relatively simple to write, just dismantle it, it may need to be adjusted according to your actual situation
如非必须要使用Map,建议使用对象代替Map