Finds the minimum numeric value of a specified property in an array of objects.
The type of objects in the array.
The array of objects.
The key whose numeric values will be compared.
The minimum value, or Infinity if no valid number is found.
const data = [{ a: 5 }, { a: 2 }, { a: 9 }];minBy(data, 'a'); // Returns 2 Copy
const data = [{ a: 5 }, { a: 2 }, { a: 9 }];minBy(data, 'a'); // Returns 2
Finds the minimum numeric value of a specified property in an array of objects.