Groovy web console

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

batchmap

Published 3 months ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
resultBatch = ['return': [['node1': 'value1'], ['node2': 'value2'], ['node3': 'value3'], ['node4': 'value4']]]

resultMapBatch = ['return': [[]]]
resultBatch['return'].each { it -> resultMapBatch['return'][0] = it + resultMapBatch['return'][0] }

println(resultMapBatch)