package json
import com.eviware.soapui.support.XmlHolder
import groovy.json.*
// get the response of the JSON test step / request.
// def response = context.expand( '${TestStepName s#Response}' ).toString()
// below is a string representing the value provided in the forum post.
//The above line can replace the below, with appropriate name of JSON response location
def response = context.expand( '${NOS 2.3 Request#Response}' ).toString()
def r = new JsonSlurper().parseText(response)
log.info(r["TTLRN"])
getting the following
response (java.lang.Object) | {"TTLRN":{"address":"tel:+9999999999","validity":"yes","carrierid":"ABCDE","carriername":"Best Mobile","numbertype":"M","country":"Angola","deactivationdetail":{"carrierid":"","carriername":"","deactivationdate":""},"deactivationdate":"","requestid":"test123","trackingid":"101"}} |
There is no response for log.info(r["TTLRN"])