Function maxByProperty

  • Computes the maximum of the values of the property for each element in the array.

    Type Parameters

    Parameters

    Returns number

    The maximum value.

    Since

    1.0.0

    Example

    maxByProperty([{ a: 1 }, { a: 2 }, { a: 3 }], "a"); // => 3