You could just the contains function in the Azure Data Factory expression language. In this example, I have used a parameter to hold the string value as I can't easily reproduce your script, but it should work for your example:
@contains(pipeline().parameters.pInput, 'exceed')
contains
returns a boolean value so I am assigning it in a Set Variable activity just as an example:

This is obviously a bit of a blunt instrument and using string methods rather than working with the json methods. If you wanted to, you could loop through each row with a For Each activity but it hardly seems worth it. Set the items
of a For Each activity to something like this to loop through each row:
@json(pipeline().parameters.pInput).resultSets[0].rows