Not Empty Tag unavailable?

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

Hello @Atharv_Karbhari,

You can try to hide the header using hide-block-if formatter.

Please check out the articles. You'll find some examples of the formatter usage.

There is another useful formatter Map.

If a tag has a specific value, it shows a certain text in the result document.

Best regards,
Petr
Plumsail team