function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
amateur1amateur1 

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

hemantgarghemantgarg

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.

amateur1amateur1

can u give me a sample code please