How to write trigger condition

I’ve run into this issue and im still working it but I know that because the buckets are in an array like the results you have to include that array in your source like the [0] here referencing the first item in the array. What I am trying to figure out is how to match that against all buckets.

ctx.results[0].aggregations.group_by_host.buckets[0].doc_count

1 Like