Computes the maximum of the values of the property for each element in the array.
maximum
property
The array to iterate over.
The property to get the value per element.
The maximum value.
1.0.0
maxByProperty([{ a: 1 }, { a: 2 }, { a: 3 }], "a"); // => 3 Copy
maxByProperty([{ a: 1 }, { a: 2 }, { a: 3 }], "a"); // => 3
Computes the
maximumof the values of thepropertyfor each element in the array.