Articles on: Tutorials

Print a list of strings

Print a list of strings / numbers



The goal is to print each elements into a newline.
The following JSON dataset is used as an example:

{
 "fruits": [   "Banana",   "Apple",   "Strawberry",   20,   "Orange"    ]
}

The solution is to join all elements with new line characters \n with :arrayJoin, then convert them into DOCX/ODS/ODT/PDF formats with :convCRLF, such as:
{d.fruits:arrayJoin('\n'):convCRLF()}


ODT template edited with LibreOffice


 PDF preview on the right, and JSON dataset on the left - Carbone Cloud Studio

Learn more:
arrayJoin documentation
convCRLF documentation

Updated on: 09/09/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!