Groovy web console

subscribe to the feed Subscribe
to this

parse json to get token

Published 5 years ago by nmrao with tags parse json
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def response = """{
  "accessToken": "fjskjlkdkkfjsfk98294239482",
  "status": {
    "code": 0,
    "message": null
def parsedJson = new groovy.json.JsonSlurper().parseText(response)
println parsedJson.accessToken