I'm sure this question may seem simple to some, but as a JavaScript novice, I couldn't find the answer myself. Here is the code snippet I'm working with:
Let map = new Map<String,String>
map.set('0', select)
map.set('1', "foo");
map.set('2', "bar");
map.set('3', "baz");
My goal is to sort this map based on the values, with index 0 remaining at the top while sorting the rest. The desired output should look like this:
[{'0':'Select'},{'2':'bar'}, {'3':'baz'}, {'1': 'foo'}];
If anyone could assist me with this, I would greatly appreciate it.