Outsystems list in JS


Hi everyone.

 I have a Webblock, that webblock receives a list of strings as an input, I want to iterate through that list in an expression where I have some Javascript, problem is I dont know how to approach this.

 On one hand I thought that copying the list in JS using slice but that doesnt work since In the expression I cant use the list!

 I also though about using a Webblock variable (integer) to keep the indexes  but I cant update that variable from JS, so I am not sure how to proceed! Any tips?


Hi Guilherme,

You can serialize the list and pass as a string to JavaScript.

You can use, for example, JSonSerialize



Hi Eduardo,

 Good one, that will do the trick, thanks Eduardo!