hello all,
i'm doing lookup with 2 if statements and i want output in json that looks like this :
{{#lookupIssues}}
{{#if(equals(Billed.value, "Billed"))}}
{
"Issue_ID":"{{key}}",
"Task":"{{summary}}",
"Time":"0:0",
"TimeInvoiced":"{{#=}}{{worklog.timeSpentSeconds.sum.divide(3600)}}+{{subtasks.timetracking.timeSpentSeconds.sum.divide(3600)}}
{{/}}h",
"Solutionist": "{{assignee.displayName}}"
}{{^last}},{{/last}}
{{/}}
{{#if(equals(Billed.value, "Non-Billed"))}}
{
"Issue_ID":"{{key}}",
"Task":"{{summary}}",
"Time":"{{#=}}{{worklog.timeSpentSeconds.sum.divide(3600)}}+{{subtasks.timetracking.timeSpentSeconds.sum.divide(3600)}}
{{/}}h",
"TimeInvoiced":"0:0",
"Solutionist": "{{assignee.displayName}}"
}{{^last}},{{/last}}
{{/}}
{{/}}
],
i have problem that it's putting comma after every item, even after last one ...
{{^last}},{{/last}} should put comma only if the item is not last but it's not working :-/
can anyone help me on this ??
usually i have between 10-50 item in lookupissues...