let tags = {
"01": {
contentID: [10, 20],
occurrences: 1
},
"02": {
contentID: [10, 20],
occurrences: 1
},
"04": {
contentID: [10, 20],
occurrences: 3
},
"05": {
contentID: [10, 20],
occurrences: 6
}
};
How to sort this in descending order by taking occurrences as base, This is a global variable. So I want to store it in a different object and sort that one with descending order..