how to get maxby number in array using property code example
Example 1: find max of array of objects key
Math.max.apply(Math, array.map(function(o) { return o.y; }))
Example 2: max value array of object javascript
Math.max(...arr.map(o => o.value));