# Elastic Synthetic - gval expression assistance

**URL:** <https://discuss.elastic.co/t/elastic-synthetic-gval-expression-assistance/362670>\
**Category:** Synthetics\
**Created:** [July 8, 2024, 4:48am UTC](https://discuss.elastic.co/t/elastic-synthetic-gval-expression-assistance/362670 "2024-07-08T04:48:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![russellp1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/russellp1/32/122612_2.png) [@russellp1](https://discuss.elastic.co/u/russellp1)\
**Post date:** [July 8, 2024, 4:48am UTC](https://discuss.elastic.co/t/elastic-synthetic-gval-expression-assistance/362670/1 "2024-07-08T04:48:46Z")

</div>

Hi All,

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

Example of the payload is below.

```auto
[
  {
    "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.

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

```

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

```auto
any(@.name == 'server_1')

```

Can anyone assist or provide some guidance?

Thanks!

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [July 8, 2024, 2:15pm UTC](https://discuss.elastic.co/t/elastic-synthetic-gval-expression-assistance/362670/2 "2024-07-08T14:15:47Z")

</div>

From #Elastic Observability to #Synthetics
