+ Start a Discussion

map key order by

hi i have created a map with date as key and string as values.now i want the values to be displayed according to date ascending order how can i order by my key in the map


Can be done using programming,

1) first create a list of your map keys,

2) sort that list.

3) then iterate this list of sorted dates

4) create a new list of string

5) find the string value from the map using the date in loop

6) add that string into new list

7) at last you will be having a sorted list of string.


let me know if it works, or if you need the code.


can u give me a sample code please