filter biggest value javascript object

JavaScript
Math.max.apply(Math, array.map(function(o) { return o.y; }))const max = data.reduce((prev, current) => (prev.y > current.y) ? prev : current)

Source

Also in JavaScript: