jsonPath: is it possible to select the array element whose property has a certain value?

I have a bit of JSON that includes an array of objects. I want to select the JSON of the object with a particular ID. For example:

`
{
results: [
{ id: “”, … }
{ id: “”, … }
{ id: “”, … }
]
}

`

I imagine the answer is no, but it never hurts to ask… Is it possible to compose a jsonPath() query that will select the full object given the specific ID? For example,

`
jsonPath( “$.result[*]{where:id=”${RECORD_ID}}" )

`

Is there a syntax hidden somewhere in there that I have not found that would let me do something like that?

The syntax is not hidden, please check JsonPath spec (there’s a link in Gatling documentation).
See here for an example: https://github.com/gatling/gatling/blob/master/gatling-core/src/test/scala/io/gatling/core/check/extractor/jsonpath/JsonPathExtractorSpec.scala#L95

You’re right, it’s not hidden, I just needed to look. That is cool! Thanks!