With PostMan, how can save the follow response:
[
{
"id": "6254c754-5a97-43fd-9b48-c428b9bd69e5",
"name": "fdsfds",
"description": "fdzf",
"type": 0,
"createDate": "2018-08-01T17:49:29.071+01:00",
"lastUpdateDate": "2018-08-01T17:49:29.071+01:00",
"lastUpdateUser": null,
"variables": null,
"instructions": null
}
]
on a variable? For example the id?
var jsonData = pm.response.json();
console.log(jsonData.id);
pm.globals.set("variable_key", jsonData.id);
to set the environment variable "authkey" from response
var obj = pm.response.json()["token"];
pm.environment.set("authkey", obj);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With