hello,
I’m new to this and trying to do a flow where 1 send request will create a variable called orgID from the response it gets and pass it on to the next send request.
the first flow when I run it, generates this below.
[ { “id”: “11223344”, “name”: “somename”, “url”: “https://someurl”, “api”: { “enabled”: true }, “licensing”: { “model”: “co-term” }, “cloud”: { “region”: { “name”: “North America” } } } ]
I want to create a collection variable called myOrg using the tests section and have myOrg have the value 11223344.
this is the tests I have so far but it’s just dumping the entire response back on console starting from id which isn’t what I need, I need myOrg to contain only the value 11223344.
var jsonData = JSON.parse(responseBody);
pm.collectionVariables.set(“myOrg”, pm.response.json.id);
console.log(pm.response.json(“myOrg”));