How to find the max/min of a nested array in javascript?
If you have a nested array of numbers (arrays = [[1, 2], [20, 3]]), nest d3.max: var max = d3.max(arrays, function(array) { return d3.max(array); }); Or equivalently, use array.map: var max = d3.max(arrays.map(function(array) { return d3.max(array); })); If you want to ignore string values, you can use array.filter to ignore strings: var max = d3.max(arrays, … Read more