const [ key ] = Object
.entries(data)
.reduce((max, [ k, { Number_of_Something: v } ]) => {
return max[1] > v ? max : [ k, v ];
}, [ null, -Infinity ]);
или
const key = (Object
.entries(data)
.sort((a, b) => b[1].Number_of_Something - a[1].Number_of_Something)
.shift() || [ null ])
.shift();
или
let key = null;
let max = -Infinity;
for (const k in data) {
if (data.hasOwnProperty(k) && data[k].Number_of_Something > max) {
key = k;
max = data[k].Number_of_Something;
}
}
или
const max = Math.max(...Object.values(data).map(n => n.Number_of_Something));
const key = Object.keys(data).find(k => data[k].Number_of_Something === max) || null;