• JMap.Form.processRule

    Processes a JSON Logic rule and returns the result, or undefined if rules are not correct.

    https://github.com/jwadhams/json-logic-js#readme

    Parameters

    • rule: any

      the json logic rule

    • data: any

      the data

    Returns any

    Example

    // returns "banana"
    JMap.Form.processRule({"var" : 1 }, [ "apple", "banana", "carrot" ])