Iām developing a pre-request script. This script does a POST to get a JWT that Iāll use for my main request. The POST returns with a http 200 so all goodā¦ if I comment out the attempted parse, it all completes with no issue. I have a result that passes JSONlint ā¦ so I didnāt expect any issues.
Its a simple response and I simply want to get the āvalā attribute but the JSONParse fails.
The Postman console says āJSONError: Unexpected token u in JSON at position 0ā and as you can see thereās no āuā attribute in the response. Yes, I see that inside the value for āvalā the letter āuā turns upā¦ that canāt be the issue.
How can I sort out whatās happening so I can make this work?
{
āttā: āJWTā,
āvalā: āeyJraWQiOiJJYW1Kd2tLZXkiLCJhbGciOiJFUzI1NiJ9.eyJqdGkiOiJKMFZjazlsaDc2QlVQdnBrenJVU3hnIiwiaWF0IjoxNjEyMzk0NjUwLCJpc3MiOiJJQU0iLCJhdWQiOiIxMjduamNsZW14OSIsInN1YiI6IjEyN25qY2xlbXg5IiwiZXhwIjoxNjEyMzk1NTUwLCJ0a25mbyI6IntcImFjY2Vzc190b2tlblwiOlwiYTFhY2E2YjctMmZhZS00MDExLTg0OTEtM2M3ODJmMTZhYmI0XCIsXCJzY29wZVwiOltcInNlcnZpY2VJbnN0YW5jZTovY29tLmZpY28uZG1wLnMzL3Jlc3Qvc2VydmljZS9zb2x1dGlvbmluc3RhbmNlcy8xMjdubzB4c3kxaC9hcGlcIixcIlBVVDpjb25zb2xlLmRtcy5wcmV2aWV3LnVzdzIuZmljb2FuYWx5dGljY2xvdWQuY29tXCIsXCJzb2x1dGlvbklkOjEyN25qY2xlbXg5XCIsXCJvPUZJQ08tRklFTEQtVEVOQU5UXCIsXCJzZXJ2aWNlSW5zdGFuY2U6L2NvbS5maWNvLmRtcC5zMy9yZXN0L3NlcnZpY2Uvc29sdXRpb25pbnN0YW5jZXMvMTI3bm84dTk1NGIvYXBpXCIsXCJjbGllbnRfaWQ6MTI3bmpjbGVteDlcIixcIlBPU1Q6Y29uc29sZS5kbXMucHJldmlldy51c3cyLmZpY29hbmFseXRpY2Nsb3VkLmNvbVwiLFwic2VydmljZUluc3RhbmNl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