Is there a way to sort nested objects by one of their parameters?
For example, if I have a data structure like this:
var someObject = {
'part1328': {
'time': 1543203609575,
},
'part38321': {
'time': 1543203738716,
},
'part1328': {
'time': 1543203746046,
},
'part38338': {
'time': 1543203752264,
}
};
and I don't know how many parts I'll have in advance or what their names will be. Is there a way I can sort the parts by their time and get the most recent and oldest parts?