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.
I'm using a for loop in my transformer to;

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

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

Hey @DionC!

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

const listviewObjectData = {{ }};
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.