01-11-2022 06:09 AM - last edited on 03-09-2022 11:09 PM by smallbusiness
Hi ,
I have been trying to parse a json response in the CVP call studio 12.5.1
The response is as below :
{
"first": {
"details": [
{
"Number": "123456"
"contactname": "John"
"Application": ""
}
]
}
"taxID": null
"requestnum": "abcdef-72e1-11ec-bcb0-003400bcab81"
"links": {
"selfnone": "/care/cm/cach/first/123456/details"
"notestext": "/care/cm/cach/first/123456/notes"
"auditing": "/care/cm/cach/first/123456/audit"
}
}
I tried to extract contactname using the below expression in Set value element :
importPackage(com.audium.server.cvpUtil);
var val={Data.Element.query_test.response_body};
var path="$.first.details.contactname";
JSONPathUtil.eval(val,path);
When i debug the call studio project , i get the exception. I have set the response body in the previous element name query_test and could see the value in the logs as well.
I could not get any value of contactname from the above expression. Can anyone guide if they have suggestions .
Solved! Go to Solution.
01-11-2022 06:24 AM
01-11-2022 06:24 AM
01-11-2022 08:31 AM
Just noticed it says "Rising star" next to Janine's name. Who do we have to petition to have that changed to "Geostationary Orbit"?
01-11-2022 07:34 PM
Thanks for showing us that we can use jsonpathfinder to get this syntax ! It worked ! Thanks a lot @janinegraves .
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