My document body consists of the following content:
Refund
Refund of {{collection.prop1}} initiated by {{collection.prop2}}.
Now, if the collection is empty, none of the rows are visible which makes sense. Although, I wish not to show the heading (Refund) in case the collection is empty.
What I tried
I tried using combinations of the empty()
tag as follows {{collection.prop1}:empty("")}. But not of it seemed to work.
Expecting an answer for:
Kindly let me know if I could somehow remove the heading "Refund" by using some conditional formatting in case the collection is empy.
Eg:
With
{
"refunds": [
{
"money": 100,
"name": "Abc"
}
]
}
The Output should be:
Refunds
Refund of 100 initiated by Abc
Whereas,
{
"refunds": []
}
Should not display at output at all