Best answer

How to select first line item from webhook results?

  • 25 February 2022
  • 1 reply
  • 416 views

Hi everyone,

 

Here is my issue: I use a Catch Hook in my workflow. The result from the Catch Hook looks like this:

 

Result Objects Jobs: [“A”,”B”,”C”],[“D”,”E”,”F”], [“G”,”H”,”I”]

 

What I need is to get the first item in each array: A, D and G. Using line-items with a Zap Formatter doesn’t work (it results in “A,B,C,D,E,F,G,H,I” etc) , and I could not find any code to achieve that (I don’t code). Could anyone help me find the proper code?

 

Thank you in advance!!!!

​​​​​​​Best, Romain

 

icon

Best answer by robschmidt 25 February 2022, 03:16

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +9

Hi @RomainSF ,

Try using Loop by Zapier, you will be able to map the first item. You will probably need to use Formatter > Line item to pick the first value of each array.

https://zapier.com/help/create/other-functions/loop-your-zap-actions