How to use a variable in JsonPath filter

Read this first: https://github.com/intuit/karate#rules-for-embedded-expressions

And what you are looking for is this: https://github.com/intuit/karate#jsonpath-filters

* def ids = karate.jsonPath(response, "$.kittens[?(@.name=='" + name + "')].id")

Leave a Comment