The Object.entries() method seem to output the keys in an ascending order:
// array like object with random key ordering
const anObj = { 100: 'a', 2: 'b', 7: 'c' };
console.log(Object.entries(anObj)); // [ ['2', 'b'], ['7', 'c'], ['100', 'a'] ]
I am not sure it this is always the case, but if it is so, is there any way of reversing the order?