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?