A part of my website requires me to use the write() method of writing javascript to html. This works fine when extracting data from App Connect with dmx.parse.
eg.
var check_id = dmx.parse('serverconnect1.data.getResult.id');
You can’t do it like that. You would have to assign the result array to a variable and use a javascript loop to iterate through it. Something like this:
var repeater = dmx.parse('serverconnect1.data.getResult');
for (i = 0; i < repeater.length; i++){
document.write("<div>My repeat ID is: "+repeater[i].id+"</div>");
}
To a large degree, it doesn’t matter whether it is in script tags or a separate file. What matters more is timing. I would typically put this in a function that is called on success of the server connect that feeds the data to it.