06-05-2017 09:42 PM
Hi Team,
I am trying to make a REST call using Call studio REST Client to an endpoint. However, in my json response, i get multiple values.
Although, i could see all the responses in the log, my requirement is to utilize only 1 response.
As per documentation, it looks like i can achieve the same outcome using json expression but it doesnt work.
Example my response id looks like this:
{
"item": {
"id": 123,
"url": "https://{subdomain}.zendesk.com/api/v2/items/123.json",
"name": "Wibble",
...
"created_at": "2012-04-04T09:14:57Z"
}
}
Now, i just need to store value of id in one of the session data. However, current response_body stores the entire response.
My xpath/json path looks like this : /item/id
Please help.
08-14-2019 10:26 AM
Got this working with help from Paul and Janine
var pathExpression = "$.accounts[?(@.accountNumber=='1234567890')].accountName"
The quotes did the trick.
Regards
04-24-2024 08:20 PM
Thanks for this doc, Bill... it helped me get across the finish line with my Set Value element.
04-25-2024 07:34 AM
I'm glad this helped you.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide