79430645

Date: 2025-02-11 16:22:40
Score: 1.5
Natty:
Report link

As far as I got your requirement it would be something like this:

def payload = []

1.upto(vars.get('foo_matchNr') as int, { roomId ->
    def startValue = 9173
    1.upto(300, block -> {
        def entry = [roomId: vars.get('foo_' + roomId), daysCount: startValue as String, a: "F", x: "0", t: "0", y: "-", l: "0"]
        startValue = startValue + 1
        payload.add(entry)
    })

})

vars.put('payload', new groovy.json.JsonBuilder(payload).toPrettyString())

More information:

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • High reputation (-1):
Posted by: Ivan G