Hi
I have a request that returns a body out of which I extract a list from the jason response like so:
.check(jsonPath("$.data[*].drugName").findAll().saveAs("topResults"))
This sets topResults to a string value of an array of drugnames
I’d like to use this array in another request body. I tried using elfilebody with:
"topResults": ["${topResults}"]
but that does not set it as an array of all the elements. It sets it as a single element array with a string of all the elements. I also tried splitting the string and adding it as an array using:
"topResults": "${topResults}"
but that, again adds a string and not an array
How to I add an extracted json array to the body of another request?
A