Function dynamicSort

  • Sorts a List based on the given property Usage :

     a = [{a : 1, b: 2}, {a : 2, b: 1}];
    b = a.sort(dynamicSort('b'))
    b => [{a : 2, b: 1}, {a : 1, b: 2}]

    Export

    Returns

    Parameters

    • _property: string

      Property Name / Path to Sort the List

    • reverse: boolean = false

    Returns any

Generated using TypeDoc