how to sort the map by the value in js code example
Example: javascript sort map by value
var mapAsc = new Map([...map.entries()].sort((a,b) => a[0] > b[0]));
var mapAsc = new Map([...map.entries()].sort((a,b) => a[0] > b[0]));