How to print two values from the response (array of JSON objects)
I have a test in Karate where the response is an array of JSON objects, all of them include a key called id. and name. I need to print only id -> name from the entire response
I can print a single values like this
- def id = $response.data[*].id
- def name = $response.data[*].name
But not sure how to print both values together
I can print a single values like this
- def id = $response.data[*].id
- def name = $response.data[*].name
But not sure how to print both values together like
1 - John 2 - David 3 - Tom