Hallo All,
i have following response and want to write the “session-id” into a variable for further using.
{
"id": 1,
"result": {
"result": true,
"mail": "[email protected]",
"session-id": "xyz"
}
}
My Test script is:
let jsonData = pm.response.json();
console.log('All keys: ' + Object.keys(jsonData.result));
console.log(jsonData.result.mail);
console.log(jsonData.session-id);
In the console i can read all keys and the last line gives in the console:
“ReferenceError: id is not defined”
What can I do to get the session-id
from the json?
Greetings Lutz