Searching through an array

Hi all, I've done some searching through the forum and I can't seem to figure this out. I'm sending an email message to IBM Watson classifier. It is returning an array object with each sentence individually classified. I'm looking to see if any of the top_class match a particular string so I need to search through the array with a switch variable in order to initiate different workflows based on existing classifications.

I tried splitting the message, converting it to another type, and I can't seem to find how to get string values in an array to trigger the proper switch.

Thanks,
Joe

It is much easier to help you if you post an example of the message

At the end of this message is the email I'm checking:

The idea is to have classifier identify if any of these are an adverse event or request for information. I send it to the classifier and the results come back into a collection array, properly identifying the top_class of Adverse_Event for the 3rd sentence. The intent of Adverse Event could be anywhere in the message so if there is a top_class of Adverse_Event identified anywhere, I need the switch to send the message to an email for notification.

"I was going to the store. I fell and needed to take some medicine. After I took the aspirin I got a rash.

Thanks,

Joe Pierce"

Do you mean your result is something like

msg.payload
   array[]:
     0: "I was going to the store."
     1: "I fell and needed to take some medicine."
     2: "After I took the aspirin I got a rash."
     3: "Thanks,"
     4: "Joe Pierce"

?????

Have you thought about Splitting that array up, and then throwing it through a Switch node with some regex to find your keyword in the sentence/payload?