Help cleaning up this data transformation code

Yeah true. But I will keep the for in my code so it’s easy to see how the data looks like.