Groovy web console

subscribe to the feed Subscribe
to this
site
jsonquery (via #groovywebconsole)
tweet this snippet Tweet
this
script

jsonquery

Published 6 months ago by nmrao with tags json query
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def json = """{
    "Request": {
        "UserId": "user",
        "TxnType": "fetch"
    }
}"""

def transactionType = new groovy.json.JsonSlurper().parseText(json).Request.TxnType
println "TxnType is : ${transactionType}"