Accessing elements in set type


I would like to create a set like the following :

local test_set: set[ string, count, string, string];

and fill it with various entries :

test set = ( [ value1, value2, value3, value4 ] , [ value5, value6, value7, value 8 ] )

Is it possible to access only one value in one entry ?

For example is it possible to write :

if (value1 in test_set)

where value1 would be the 4th value of one entry.

No, Zeek does not support testing for individual elements in sets with compound elements. You would instead need to use a second set that tracks individual elements as they’re added to the first set, and then do the in lookup instead in the second set.