Forum Discussion

bgoh29's avatar
bgoh29
Occasional Contributor
3 years ago

how do I change the input value within JSON in the request body

I want to modify the values within JSON in the request body. Here's an example of the request body   {  "driverId":  "${userInfo#Respoinse#$id},  "otherDetails" : "${driverDetails#Response#$detail...
  • KarelHusa's avatar
    3 years ago

    We need to use ${=} to execute the Groovy code. And inside the code we can use the SoapUI property.

     

    An example:

    ${="${#TestCase#petName}".reverse()}

     Please note that the quotes make a string object, otherwise it would be treated as an identifier.

     

    Best regards,

    Karel