traverse array in jelly script

Ketan Pandey
Tera Expert

HI All,

 

I have a UI Page and script Include .

 

I am calling the Script include from the UI page and my Script Include return the array .

Please tell me how to traverse the array in jelly script .

 

Thank You,

Ketan

1 REPLY 1

Anand Kumar P
Giga Patron
Giga Patron

Hi @Ketan Pandey ,
You can use below script.

<j:set var="yourArray" value="${new yourScriptInclude().yourfunctionFunction()}"/>
<j:forEach var="item" items="${yourArray}">
    <p>Name: ${item.name}</p>
    <p>Description: ${item.description}</p>
</j:forEach>

Thanks,

Anand