DotLiquid Range does not work properly

18 views
Skip to first unread message

Anju Datey

unread,
Mar 19, 2020, 12:54:20 PM3/19/20
to dotliquid
Hello team,

I am using below liquid code to generate JOSN file, but not getting expected output.
I am using Azure Integration account Maps to hold liquid file and do the liquid transformation using logic apps, however unable to proceed with my work due to invalid response from Liquid Range functionality.

Code used:
{
{%- for i in (1..5) -%}
  {%- if forloop.Last == true -%}
    "test":{{ i }}
  {%- else -%}
    "test":{{ i }},
  {%- endif -%}
{%- endfor -%}
}
Expected JSON:
{
  "test"1,
  "test": 2,
  "test": 3,
  "test": 4,
  "test"5
}

Output Comes:
{
  "test"5
}

Kindly help me with this.
Thanks in advance

David Burg

unread,
Jun 4, 2020, 1:17:22 PM6/4/20
to dotliquid
Hi Anju,

As you are using Azure Logic Apps Liquid transform which is implement with dot Liquid, you can open a free support ticket in the Azure Management portal to get assistance from our customer support engineer. If they confirm it is an issue with the underlying dot Liquid implementation, they will file an assistance request with our product group engineering (or, they may find a workaround to get it to work as-is). Our product group engineering in turn will attempt to fix the open source library issue.

With regards,

David.

David Burg

unread,
Jun 4, 2020, 1:19:21 PM6/4/20
to dotliquid
Also you can point out to Azure support that the same Liquid template generates the expected result at http://dotliquidmarkup.org/try-online which is based on the same library (so possibly the issue is not with dot Liquid itself).

- David.
Reply all
Reply to author
Forward
0 new messages