zip()
The zip function accepts any number of dynamic arrays, and returns an array whose elements are each an array holding the elements of the input arrays of the same index.
Syntax
zip(array1, array2, ... )
Arguments
Between 2 and 16 dynamic arrays.
Examples
The following example returns [[1,2],[3,4],[5,6]]:
print zip(dynamic([1,3,5]), dynamic([2,4,6]))
The following example returns [["A",{}], [1,"B"], [1.5, null]]:
print zip(dynamic(["A", 1, 1.5]), dynamic([{}, "B"]))
The following example zips up the name and data source name.
events
| project original_time, data_source_name, name
//--- Search for the last 5 minutes of data
| where original_time > ago(5m)
//--- USER Criteria Here
| summarize a = make_list(name), b = make_list(data_source_name)
| project zip(a, b)
Results
Showing subset of zipped values
| Column1 |
|---|
| User Info,Juniper JunOS Family of Devices @ cs3.gnu.linux6,..., User Info,Juniper JunOS Family of Devices @ cs3.gnu.linux6 |