I have tried to find a solution and could find something that is close but not there yet. Javascript sort an object by keys based on another Array? I want to sort them by ABC ascending and descending and I don't know where to start.
const Accounts = {
'thing': {
password: '123',
}
}
const sortedKeys = Object.getOwnPropertyNames(Accounts).sort();
//This returns the names but not the passwords