javascript object select object with highest value code example
Example 1: filter biggest value javascript object
const max = data.reduce((prev, current) => (prev.y > current.y) ? prev : current)
Example 2: find max of array of objects key
Math.max.apply(Math, array.map(function(o) { return o.y; }))