How to use liquid in a trigger to convert {{ticket.tags}} to create a proper array?
Gepostet 26. Okt. 2022
Hello!
Working with {{ticket.tags}} in a notify trigger action, I have been unable to convert the string output of {{ticket.tags}} back to an array to send. Are there some examples you can provide? My attempts always lead to escaped double quotes inside the array structure
my liquid: "tagFix": [{%assign tagFix={{ticket.tags}} %} {{ tagFix | replace:' ','","' | prepend: '"'| append:'"'}}]
resulting output: "tagFix": [
\"_added_csm\",\"_country_andorra\",\"_alt_pin\",\"_case_update\"]
Does anyone have a solution for taking the output of {{ticket.tags}} and converting it to a proper JSON array with out the quotes escaped, for use in a notify webhook? Might there be some other placeholder that does return the ticket's objects tag array as an array?
2
0 Kommentare
Melden Sie sich an, um einen Kommentar zu hinterlassen.