need help in transforming the below data. the input and expected output is mentioned below. need to loop over the nested array to get the desired output. i am new to groovy