Can't fetch data from JSON response
I'm connecting to an external API with a postURL and saving the result to a 'result' variable. I'm getting the correct response, as shown in the screenshot below, but I'm unable to extract data from it with get(), getJSON, etc.
If I manually copy and paste that exact result into a variable 'testString' and then do testString.getJSON("Token") I am able to extract the value from Token.
- testString = "{\"AaId\":1966,\"Token\":\"/n4ubJ112kjiQXCbjNx8TraERRxjCRL4\",\"bID\":3443,\"isTmpPwd\":null}";
But if I do result.getJSON("Token") execution fails due to "Invalid collection string". I've tried removing the backslashes (without success) and tried functions like toString() and toText() to no effect.
What am I doing wrong?
Access your files securely from anywhere
Zoho Developer Community
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.