Js code
exampleArray = [project1,project2];
var templateproject = JIRA.Templates.LP.project(exampleArray);
AJS.$('#page-container').append(templateproject);
soy template
{namespace JIRA.Templates.LP}
{template .project}
<table class="aui">
<thead>
<th>Project Title</th>
</thead>
<tbody>
{foreach $key in keys($exampleArray)}
<tr>
<td>{$exampleArray[$key]}</td>
</tr>
{/foreach}
</tbody>
</table>
{/template}
Is this correct way of looping soy template when passing array as data.
You can also do:
{foreach $project in $exampleArray} <tr> <td>{$project}</td> </tr> {/foreach}
At the American Academy of Family Physicians, siloed marketing teams faced delays and duplicate work. Kerrie Gottschalk shook things up by moving the department to Jira, streamlining processes, boosting visibility, and sparking stronger collaboration.
Read the story
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.