donaldngo
14 years agoOccasional Contributor
How do i get JSON values from a response in Groovy
Hi I figured out how to grab NodeValue from XML responses in Groovy using: def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ) def holder = groovyUtils.getXmlHolder ("create a ...
- 9 years ago
Here is the later part of the script:
It was not working because, items is a Json Array.
json.items.eachWithIndex{ item, index -> log.info "Item #: ${index}" log.info "Item resource Id: ${tem.resourceId}" log.info "Item name : ${item.name}" log.info "Item resource type : ${item.resourceType}" log.info "Item status : ${item.status}"
}