I have to parse the json response and get the value of a field "bookName": "MyBook 001"
Here is my response:
{
"meta":{
"/data/library":{
"bookName":"MyBook 001",
"/book/ID":{
"readOnly":true,
"optional":false,
"hidden":true
}
}
}
}
This is my script assertion:
import groovy.json.JsonSlurper
def ResponseMessage = messageExchange.response.responseContent
def jsonResponse = new JsonSlurper().parseText(ResponseMessage)
def bName =jsonResponse.meta.data/library.bookName
log.info bName
I get error as no such property library I tried using Soapui 'get data' option. But context.expand is not working when running from maven/jenkins.
How do I parse this response containing data/library?

/in the property name? - Rao