Hello, i got the following issue:
I am getting and error storing my value on a global variable, i added the jsonslurper, and is storing my value, but with brackets, how i can delete the brackets?
Here is my code:
res1 = WS.sendRequest(findTestObject('API/Users, Companies, Groups/Groups/CREATE GROUP'))
WS.verifyResponseStatusCode(res1, 200)
def slurper = new groovy.json.JsonSlurper()
def result = slurper.parseText(res1.getResponseBodyContent())
def value = result.id
println('the value is: ' + value)
GlobalVariable.TestData = value
println('test data is: ' + GlobalVariable.TestData)
this is the console result:
i dont need the brackets: [id] what i need is only the id, so i can use it on another test