Sorting Map on the basis of key which are number in JS So I am trying to sort a Hashmap which . I want to sort them on the basis of their key value but can’t find the answer to it.