Get result of a webservice task in piped text | XM Community
Skip to main content

Get result of a webservice task in piped text


JR33
QPN Level 2 ●●
Forum|alt.badge.img+10
  • QPN Level 2 ●●
  • 75 replies

Hi there,
I just want to get results from a POST API (search contacts in a directory), but all the body of the result go to a unique $.result piped txt. How can I get a unique element like "id". I've tried $.result.element.id but it didn't work.
image.pngThanks

2 replies

Appzk
QPN Level 5 ●●●●●
Forum|alt.badge.img+32
  • QPN Level 5 ●●●●●
  • 276 replies
  • January 19, 2023

Try '$.result.elements[0].id'
Also, when you test run the web service for the existing contact it does return id.


JR33
QPN Level 2 ●●
Forum|alt.badge.img+10
  • Author
  • QPN Level 2 ●●
  • 75 replies
  • January 20, 2023

Yes, that's what I understand after I've posted this message.
The result of this API call is an object from an array, so with the webservice task I cannot get one object after an other. I'm right ?


Leave a Reply