0
votes

ErrorTrying to extract the response property by parsing the JSON, receiving NoSuchProperty error

import groovy.json.JsonSlurper
def response = messageExchange.response.responseContext
def json1 = new JsonSlurper().parseText(response)
log.info json1.results[0].id
1

1 Answers

0
votes

Looks like a typo. Try:

def response = messageExchange.response.responseContent