Syntax
REDUCE(array, LAMBDA(previous_value, current_value, [expr]), initial value)
Usage examples
Example 1
Formula | REDUCE(my_array, LAMBDA(previous_value, current_value, PLUS(previous_value, current_value)), 0) |
Output | 55 |
Example 2
Formula | REDUCE(array_of_objects, LAMBDA(previous_value, current_value, MERGE(previous_value, current_value)), OBJECT()) |
Output | 1 { 2 "dest_ip": "172.16.1.23", 3 "file_hash": "2968896cb4639d4c839ab802720266d35bb15be93e3a4055109aa3bf1779f591", 4 "file_name": "executable.exe", 5 "src_ip": "192.168.1.100", 6 "timestamp": "2022-02-15 12:30:00+0000", 7 "user": "bob.smith" 8 } |
Sample Actions
Event Transform
REDUCE
Event Transform
My Action
Select an Action to inspect.
You can also click "Copy Actions" and paste them in your Tines Story to see how they work.