ichigyou
    Preparing search index...

    Function sortByProperty

    • Sorts an array of objects based on a specified property.

      Type Parameters

      • T extends { [key: string]: string | number }

        The type of the objects in the array.

      Parameters

      • arr: T[]

        The array to sort.

      • prop: string

        The property to sort by.

      Returns T[]

      • The sorted array.