I searched the community and found questions the are a little bit like mine but i could not find a answer to my question. I think for someone who knows javascript and Postman its easy. So i hope you can help me!
I have two GET Statements which asks a server and set the answer number as variable in my Postman Environment that works fine.
var jsonData = JSON.parse(responseBody);
postman.setEnvironmentVariable("state_server1", jsonData.results[0].attrs.state);
and the same for my other Server. Now i have a PUT Statement which uploads the variable from state-server1 and state-server2 in a CMS that works fine. Now i want to have a if query which checks if the variables state_server 1 === 0 && state_server 2 === 0 are both 0 and create a new variable state_server 12 = No problems!
So the code would be simply in my head likely so:
var state_server 1
var state_server 2
if(state_server 1 === 0 && state_server 2 === 0){
make new variable state_server12 = problems!
Hope you understand me and you can help me!