Elastic Synthetic - gval expression assistance

Hi All,

We're using Elastic Synthetics to monitor a http endpoint that returns a json payload.

Example of the payload is below.

[
  {
    "name": "server_1",
    "status": "ready"
  },
  {
    "name": "server_2",
    "status": "ready"
  }
]

I am trying to create a gval expression that can validate that there is a record with name == "server_2" and "status" == "active" for that server.

I tried the below, and variations of it (shown), but either it fails to compile or can't find the object.

any(@.name == 'server_1' && @.status == 'ready')

or the below to simplify it to get a validation before expanding

any(@.name == 'server_1')

Can anyone assist or provide some guidance?

Thanks!

From Elastic Observability to Synthetics