Checking sorting in object

Hello everybody,

I’m trying to find a solution on how to check sorting/ordering in a similar response:

{
    "30": [
        {
            "Number": 1
        }
    ],
    "40": [
        {
            "Number": 2
        }
    ],
    "20": [
        {
            "Number": 3
        }
    ]
}

A response should be sorted by “Number” value in ascending order.

That is fairly easy with an array.

var array = [
                ["30", 1],
                ["40", 2],
                ["20", 3],
            ];
var sorted = array.sort((a, b) => b[1] - a[1]);
console.log(sorted);

I’ve sorted it in descending order, as your data was already in ascending order.

I’ve tried importing your data\object into an array and my Javascript skills are failing me.
I’m looking it up now. If I find out how to do it properly, I’ll update here.