Copy link to clipboard
Copied
I am trying to use a 'conditional-section' within my document template to check if a string contains a certain substring. Take the example shown below:
Assume my JSON input looks like this:
{% conditional-section expr(House.furniture contains “Couch”) %}
The house contains a couch!
{% end-section %}
Is this possible? The docs linked below make no mention of such functionality.
Template Tags | Document Generation API | Adobe PDF Services
Document generation tags are jsonata compliant. And jsonata does support a contains function. You can find more details here https://docs.jsonata.org/string-functions . So in your case you can give the expression inside condition as $contains(House.Furniture,"Couch")
Copy link to clipboard
Copied
Document generation tags are jsonata compliant. And jsonata does support a contains function. You can find more details here https://docs.jsonata.org/string-functions . So in your case you can give the expression inside condition as $contains(House.Furniture,"Couch")