Parsing response value of X-XSRF-TOKEN to envinronment varable

I’m trying to get value of X-XSRF-TOKEN to environment variable
But i keep getting There was an error in evaluating the test script: JSONError: Unexpected token ‘E’ at 1:1 ECB9869521CA0FE219335DA9C0A5EB886E0D1CA7972DC2DF23B2E3441D57B2631ACA8048377396D ^

Test script is :
let responseData=pm.response.json();
console.log(responseData);
pm.environment.set(“X-XSRF-TOKEN”, responseData.resources.name);

The code to get the token is :
https://{{vmanage}}:{{port}}/dataservice/client/token on a cisco vmanage controller.

I solved the issue i was having, i changed the test to the following :

let ResponseData = pm.response.text()
pm.environment.set(“X-XSRF-TOKEN”, ResponseData);

Now the token is parsed correctly and the X-XSRF-TOKEN is filled with the correct value