Forum Discussion
chathurad
Contributor
I manage to write json in to a file using below code.
import net.sf.*; import net.sf.json.*; import net.sf.json.groovy.*; import net.sf.json.groovy.JsonSlurper; def Res = context.expand( '${GetAllSchoolsForAustralia#Response}' ) def slurper = new JsonSlurper() def json = slurper.parseText Res def countryList = json.result._source.city log.info countryList def file = new File('D:/XXX/CityListAU.txt'); // save the response to it file << countryList
Related Content
- 2 years ago
- 3 years ago
Recent Discussions
- 12 hours ago