- Create a transformer that take your
table3source - Convert the data to CSV: arrays - Converting JSON object to CSV format in JavaScript - Stack Overflow
- Use your transformer as source in the PDF Content instead of
table3.data
For example, your transformer code may look like this
const source = {{ table3.data }} // You may replace this with the source used in table3 instead
function convertToCSV(arr) {
return [Object.keys(arr[0])]
.concat(arr)
.map(it => {
return Object.values(it).toString()
}).join('\n')
}
return convertToCSV(source)
And your PDF Content may be changed to this
[...]
Table:
{{ transformer1.value }}