• Returns a function that compares 2 values given a key|key path that exists in both JSON values and returns either 1, 0 or -1

    Type Parameters

    • T extends object

    Parameters

    • key: string

      A key path that should exist in both input values of the returned function

    Returns ((a, b) => 1 | -1 | 0)

    Comparison function

      • (a, b): 1 | -1 | 0
      • Parameters

        • a: T
        • b: T

        Returns 1 | -1 | 0

Generated using TypeDoc