Operations (sample payloads)
Main operationsCopy
AddCopy
Add two numbers together.
Sample Input
1{2"first_value": 5,3"second_value": "3.7"4}
Sample Output
1{2"result": 8.73}
AverageCopy
Get the average of a list of numbers.
Sample Input
1{2"values": [310,420,530,640,7508]9}
Sample Output
1{2"result": 303}
DivideCopy
Divide one number by another number.
Sample Input
1{2"first_value": 10,3"second_value": 24}
Sample Output
1{2"result": 53}
MultiplyCopy
Multiply two numbers.
Sample Input
1{2"first_value": 5.5,3"second_value": "3"4}
Sample Output
1{2"result": 16.53}
Page offsetCopy
When looping through pages, you'll often want to get the "offset" - the number of items to skip. If the page is zero based, the offset is page number x per page.
Sample Input
1{2"page": 3,3"per_page": 20,4"is_page_zero_based": false5}
Sample Output
1{2"result": 403}
Parse numberCopy
Parse a number from a string. Will parse "$20" as 20 by removing the currency symbol.
Sample Input
1{2"string": "$1,234.56"3}
Sample Output
1{2"result": 1234.563}
RemainderCopy
Given two numbers, return the remainder/modulus by dividing the first by the second.
Sample Input
1{2"value": 17,3"divider": 54}
Sample Output
1{2"result": 23}
RoundCopy
Round a number to the specified number of decimals. Note that floating point numbers cannot represent all decimals precisely in binary.
Sample Input
1{2"number": 3.14159265359,3"decimal_precision": 24}
Sample Output
1{2"result": 3.143}
Run expressionCopy
Run an arithmetic expression such as "1 + 2 * (2 + 4)" and get the result.
Sample Input
1{2"expression": "5 * (3 + 2) - 10 / 2"3}
Sample Output
1{2"result": 203}
SubtractCopy
Subtract one number from another number.
Sample Input
1{2"first_value": 10,3"second_value": 34}
Sample Output
1{2"result": 73}
SumCopy
Get the sum of a list of numbers.
Sample Input
1{2"values": [310,420,530,6"40",750.58]9}
Sample Output
1{2"result": 150.53}