Is it possible to use functions such as asJsonObject() inside iteration?
I couldn't make this:
{
"fields": {
"fixVersions": {{#project.versions}}{{#not(archived)}}{{#not(released)}{{asJsonObject("id")}}{{/}}{{/}}{{/}}
}
}So I had to do this:
{
"fields": {
"fixVersions": [
{{#project.versions}}{{#not(archived)}}{{#not(released)}}
{
"id": "{{id}}"
}{{^last}},{{/}}
{{/}}{{/}}{{/}}
]
}
}My guess is asJsonObject() like any other method has to be accessed from object variable, but how to get it from inside iteration? I can get only its properties like name or id.
My another question is how to filter-out list by regex expression? From above example if I add {{#if(name.match("^\d+\.\d+\.\d+$"))}} I get nothing. I tried many variations and did not succeed even with {{#if(not(name.match("^\d+\.\d+\.\d+\.$").isEmpty))}}. I tried simple regular expressions like ".*" and they cannot match anything inside iteration. Is it ever possible?