1
votes

I execute an xpath function in my Logic App to set the value of a variable. The result is a guid and the variable is formatted as [""]. I want to use this variable in a body message sent to an http endpoint and when I use the variable content, it sent the [""] but I need just to send the . I'm a bit lost here because I don't know how to extract only the Json value of this variable... Thanks.

1

1 Answers

3
votes

The result of the xpath function is a json array of XML nodes matching your xpath expression. If you are only expecting a single node, you can use the @first function to reference it

"@first(xpath(...))"