Groovy web console

subscribe to the feed Subscribe
to this
site

Komisches Verhalten

Published 2 months ago by Kjell
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def events = []
def event = [:]

event.put("id", "12312")
event.put("duration", 24)
event.put("time", "now")
event.put("test", "me6")

def updateMap(event, i){
   return newEvent
}

for(int i = 0; i < 5; i++){
   newEvent = event;
   newEvent["test"] = "me" + i
   newEvent["i"] = i
   println newEvent
   events.add(newEvent)
}

println events