I would like to get the value from the response based on a condition and store it to a variable.
In the below JSON, I would like to store the value when the name matches to something I prefer. Is there a way to achieve this using Karate API?
{
"results": [
{
"name": "Sample1",
"email": "sample1@text.com",
"id": "U-123"
},
{
"name": "Sample2",
"email": "sample2@text.com",
"id": "U-456"
},
{
"name": "Sample3",
"email": "sample3@text.com",
"id": "U-789"
}
]
}