Trying to use a transformer and a listview

Hi, I am trying to use a transformer in my query so I can use each row of the listview dynamically.
image
I'm using a for loop in my transformer to;

This is what I want to work, but I can't use i.
image
image

But when I use 0 it does it just gives me the value of 0 in the array.
image
image

Hey @DionC!

Can you try assing {{ listView1.data }} to a variable outside of the loop? e.g.

const listviewObjectData = {{ listView1.data }};
let listviewData = "";
for (let i = 0; i < {{ listView1.instances}}; i++){
  listviewData += '{' + listviewObjectData[i].textInput5 + '}'
}
return listviewData;

JavaScript evaluated in curly braces {{}} has its own scope so the i variable there isn't the one declared in the for loop.