Skip to main content
Best answer

How to select first line item from webhook results?

  • February 25, 2022
  • 1 reply
  • 562 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

 

Best answer by robschmidtBest answer by robschmidt

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

View original
Did this topic help you find an answer to your question?
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

robschmidt
Forum|alt.badge.img+9
  • Zapier Expert
  • 617 replies
  • Answer
  • February 25, 2022

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