let max = Math.max(...Object.values(candles)) let high = Object.entries(candles).filter(([i, data]) => max === data) return high code example
Example: javascript array find highest value of array of objects by key
Math.max.apply(Math, array.map(function(o) { return o.y; }))