1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
pm.environment.set("variable_key", "variable_value");
var array = [1, 2, 3, 4]; pm.environment.set("array", JSON.stringify(array, null, 2));
var obj = { a: [1, 2, 3, 4], b: { c: 'val' } }; pm.environment.set("obj", JSON.stringify(obj))
pm.environment.get("variable_key");
var array = JSON.parse(pm.environment.get("array")); var obj = JSON.parse(pm.environment.get("obj"));
pm.environment.unset("variable_key");
|