Groovy web console

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

json for command

Published 3 months ago by Rx
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def commandSequenceName = "!setPermidOrganization"
def input = '!setPermidOrganization "gvkey": "001019", "permid": "1-4296348622"'
def params = input.split(commandSequenceName)[1].trim()

def data = new groovy.json.JsonSlurper().parseText("{" + params + "}")

println "gvkey = " + data.gvkey
println "Gvkey = " + data.Gvkey
println "permid = " + data.permid 
println "notExists = " + data. notExists