How can I pop the last element from one array and append it to another?
Hello,
I’m working with this JSON structure:
[
{
"field_a": "string",
"entries": [{}, {}, {}],
"shared": []
}
]I need to remove only the last object from the entries array and append it to the shared array, leaving the other entries intact. What’s the most straightforward way to accomplish this?
Thank you for your help.
Kind regards,
Adam
I am attaching two sample pipelines:
1)Parent - which groups the data based on the email and send the data to Child pipeline.
2)Child - which split the groups, apply xslt transformation(generate HTML table), and send the table through email.
Parent_2021_08_27.slp (4.9 KB)
Child_2021_08_27.slp (10.2 KB)
Also, I am attaching the sample XSLT file, which you can modify based on your requirements:
XSLT_Transformation (1).txt (1.1 KB)
Note: You must create a SMTP account in order to be able to send emails, using Emails Sender Snap.Regards,
Spirp Taleski