Groovy web console

subscribe to the feed Subscribe
to this
site

Test HTML

Published 1 month ago by WWV
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
import groovy.json.JsonSlurper

def response = '{"reasons":["Transfers to 3d parties including relatives not allowed", "ololo1", "ololo2"],"customReason": "Выводы на брокерские компании невозможен"}'

def jsonSlurper = new JsonSlurper();
def object = jsonSlurper.parseText(response);
def reasons = "";
object.reasons.forEach { s -> reasons += "<li>" + s + "</li>" };

print reasons;