Function indexedBy

  • Returns an object indexed by the given field from the array of objects.

    Type Parameters

    • T extends {}

    • K extends string | number | symbol

    Parameters

    • key: K

      The key to index by.

    • array: T[]

      The array of Objects.

    • options: Partial<IndexedByOptions> = {}

      See IndexedByOptions

    Returns IndexedArray<T>

Generated using TypeDoc