Print.js icon indicating copy to clipboard operation
Print.js copied to clipboard

How to print multi JSONdata

Open TingNLP opened this issue 3 years ago • 0 comments

Dear author @crabbly In the example as follow:

 someJSONdata = [
    {
       name: 'John Doe',
       email: '[email protected]',
       phone: '111-111-1111'
    },
    {
       name: 'Barry Allen',
       email: '[email protected]',
       phone: '222-222-2222'
    },
    {
       name: 'Cool Dude',
       email: '[email protected]',
       phone: '333-333-3333'
    }
 ]

 <button type="button" onclick="printJS({printable: someJSONdata, properties: ['name', 'email', 'phone'], type: 'json'})">
    Print JSON Data
 </button>

And now I have another someJSONdata2, How to use someJSONdata and someJSONdata2 in printJS ? Is it possible like this printable: [someJSONdata, someJSONdata2] ? I just want to print two table.

thank you

#536

TingNLP avatar Sep 20 '22 09:09 TingNLP