Library API
    Preparing search index...

    Function sortKey

    • Sorts an array in place according to the specified keys or sorting options.

      Type Parameters

      Parameters

      • array: T[]

        The array to sort

      • ...keys: (PropertyKey | SortBy)[]

        Sorting criteria, applied in order of priority

      Returns T[]

      The input array after sorting

      const sorted = sortKey(users, 'lastName', 'firstName');