Function groupBy

  • Groups the elements of array by the value of key key

    Returns

    on objects mapping key to grouped elements

    Type Parameters

    • T extends Record<string | symbol, any>

    • K extends string | number | symbol

    • TK extends any

    Parameters

    • array: T[]

      and array of objects

    • key: K

      the key by which to group

    Returns Record<TK, T[]>

Generated using TypeDoc