Library API
    Preparing search index...

    Function sortKey

    • Sorts an array of objects in place by a series of keys.

      Type Parameters

      Parameters

      • array: T[]

        The array to sort

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

        The keys or sorting options to apply

      Returns T[]

      The sorted array

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