Math module

Add two numbers

{
    "type": "math",
    "action": "add",
    "args": {
        "value1": 10,
        "value2": 20,
        "target": "$data.result"
    }
}

Subtraction

{
    "type": "math",
    "action": "subtract",
    "args": {
        "value1": 10,
        "value2": 20,
        "target": "$data.result"
    }
}

Multiply

{
    "type": "math",
    "action": "multiply",
    "args": {
        "value1": 10,
        "value2": 20,
        "target": "$data.result"
    }
}

Divide

{
    "type": "math",
    "action": "divide",
    "args": {
        "value1": 10,
        "value2": 20,
        "target": "$data.result"
    }
}

Perform math function

Description:
JavaScript has a math global class with a number of methods you can call.
This call gives you access to that.

{
    "type": "math",
    "action": "do_math_api",
    "args": {
        "action": "cos",
        "value": 20,
        "target": "$data.result"
    }
}