It seems I have to learn basics of Javascript to get on with my given task.
Pls forgive my newbie questions.
Currently I want to manipulate data I get out of querying the Zammad DB into manageable objects (if that is the right term anyway )
some
See what I get so far:
[
{
"id":452,
"ticket_id":257,
"type_id":1,
"sender_id":2,
"from":"[email protected]",
"to":"'Ihr Team' <[email protected]>",
"subject":"Anfrage",
[..]
},
{
"id":456,
"ticket_id":257,
"type_id":1,
"sender_id":2,
"from":"[email protected]",
"to":"'Ihr Team' <[email protected]>",
"subject":"Anfrage 2",
[..]
},
{
"id":459,
"ticket_id":257,
"type_id":1,
"sender_id":2,
"from":"[email protected]",
"to":"'Ihr Team' <[email protected]>",
"subject":"Anfrage 3",
[..]
}
]
My goal is to “cut out” each of the articles (identified by “id”) into a separate object.
I am sure I can access that object by using the right syntax …
Each of these objects (called articles in Zammad terms) should be transformed into a HTML block, later with applied css.
Basically I want to rebuild the whole Zammad ticket:
a ticket with “ticket-id” contains of articles with “article-ids”, and articles may contain attachments with “attachment-ids”.
I think I have the 3 lists(?) as json already, now I look how I can build one large json containing all the necessary parts (at least I think this should be the way, correct me if I am wrong).
After having the large json I want to make HTML out of it, then pipe it into Gotenberg for getting a pretty pdf.
Is that a reasonable plan? help appreciated!