May be this is a very simple question on this forum but I couldn't find the answer being novice to javascript. I have this following code in javascript -
Let map = new Map<String,String>
map.set('0', select)
map.set('1', "foo");
map.set('2', "bar");
map.set('3', "baz");
I want to sort this map based on value. But index 0 should be on top and others should be sorted. So the final output should be printed as below -
[{'0':'Select'},{'2':'bar'}, {'3':'baz'}, {'1': 'foo'}];
Could you please help me on this?