Test if string is present in array of strings


I want a Decision step which has two paths: yes/no based on whether a string is contained within an array of strings.

I thought this’d be easy within InsightConnect, but I can’t figure out how to do this. Hopefully I’m missing something obvious.

What I’ve looked at

I’ve looked at the Extension Library (especially Type Converter) and any other plugin which mentions arrays, as well as Format Query Language | InsightConnect Documentation and Nested Variables | InsightConnect Documentation

Things I’ve tried which didn’t work

Although I didn’t expect it would work, I applied some optimism to the word ‘contains’ and tried:
{{["DomainsMessage"].[indicators].[domains]}} contains {{["Extract Domain from URL"].[domain]}}

where the first variable is the haystack array of strings and the second is the needle string, but this gives:
cannot use 'contains' with operands of type array and string

Can you do a Type Converter → Array Match with the first array being your hay and your second to be an array of one value being your needle then use your decision step based off the output.count being greater than 0?

Cheers @brandon_mcclure. That works, although I had to add another Type Converter step beforehand to turn the needle string into an array of strings, or the Array Match rejected the string for not being an array.