Get result of a webservice task in piped text | XM Community

Get result of a webservice task in piped text

  • 18 January 2023
  • 2 replies
  • 43 views

Userlevel 3
Badge +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

Userlevel 6
Badge +28

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

Userlevel 3
Badge +10

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