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