max value array objects 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));
Math.max.apply(Math, array.map(function(o) { return o.y; }))
Math.max(...arr.map(o => o.value));