I am trying to test my APIs in postman's mock server. I have an endpoint which returns a json with a few key value pairs.
In my request I have some key value pairs in the json format. What I want to test is as follows
Lets say if the request has a parameter called "parameter1" with value "p1". Now I want to return a different json response because it has the value of "p1". Lets say I make another request with the "parameter1" now having a value "p2" I want to return a different response. How do I do this?
I want to execute if statements / filters like if parameter1 == "p1" then return x1, if else parameter1 == "p2" then return something else etc
I looked at postman documentation but cannot figure out. Thanks in advance.