How can I display array variables out of session?

Hi,
I gt list of file names from response of a http request and saved on array. I want to download each file in subsequent request but not able to do?

code snippet is something like this

files=((session(“xyz”).split("/"))

for ( x<- files) {println(x)} //this works
session
}
.exec(http("${files(0)}") // this does not work and fails.

Hi,

Can somebody help me on this? Need this badly…

Hi,
Try to put files variable into sesion
Exec (session => {
files=((session("xyz").split("/"))

for ( x<- files) {println(x)} //this works
session.set ("files",files)
}
.exec(http("${files(0)}") //should be work