ezyVet Javascript Helper Library Documentation
    Preparing search index...

    Function findKeyAndValueByPriority

    • Finds the first key and value that meets a check in an object

      Type Parameters

      • T extends object

        extends object

      Parameters

      • data: T

        Data to find the value

      • columnsByPriority: (keyof T)[]

        Array of keys in order of priority to search the data object

      • valueCheck: (value: T[keyof T]) => boolean

        Predicate function each value found by data[column]

      Returns KeyAndValue<T, keyof T>

      The key and value as JSON