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
maximum
of the values of theproperty
for each element in the array.