Am trying to loop through a particular aggregation bucket-by-bucket and check if its corresponding key matches the value of ctx.payload.second.hits.hits.0._source.host.hostname.
If it matches (and the hits total is > 0 for each input), I'd like to have it execute. Been trying to use script condition, but am not finding success.
I'm using a chain input with two inputs ("first" and "second", respectively) and cannot seem to find the correct syntax.
Any help / example would be appreciated.