Hey guys,
New to Zapier, trying to get two JSON items and format them so they’re side by side. I’m using a Catch hook Webhooks by Zapier, and I’m getting all data correctly, like selectable via the “Insert data” drop down and picking the right parts, but I have the following JSON:
{
"subject": "test subject",
"first_name": "test",
"last_name": "test",
"email": "test@test.com",
"phone": "123456789",
"Message": {
"parts":
{
"part_number": "ABC-001",
"qty": 1
},
{
"part_number": "ABC-002",
"qty": 2
}
]
},
"notes": "This is a test note!"
}
I want to put the part_number and qty in this format in a Message that will be sent/emailed:
Part number: ABC-001 Qty: 1
Part number: ABC-002 Qty: 2
So I want the part number and quantity to be side by side, at the moment I’m getting the part number, and then underneath the quantities, all comma separated, like so:
ABC-001, ABC-002
1, 2
Obviously this would get confusing if lots of items were there, so looking to format it like the above, I’m guessing I’ll need to format it via Code by Zapier, just not sure how to access the data? or how the fields work on Code by Zapier, I take it the left field is for the variable name and then the right field is where we select what data we want? Then how to output it right for however many elements are there, some kind of loop of course but not sure the best way, or can I just format it straight in the output Message field (Create lead for Quotient) somehow?
Thanks in advance!