js/script.js
/* Sorts an object by its keys */
Sorts an object by its keys
Sorts an object by its keys
function sortObjectByKey(unorderedObject) {
        let orderedObject = {};
        Object.keys(unorderedObject).sort().forEach(function (key) {
            orderedObject[key] = unorderedObject[key];
        });
        return orderedObject;
    }
function sortObjectByKey ( unorderedObject ) { let orderedObject = { } ; Object . keys ( unorderedObject ) . sort ( ) . forEach ( function ( key ) { orderedObject [ key ] = unorderedObject [ key ] ; } ) ; return orderedObject ; }
Sorts an object by its keys
Sorts an object by its keys