postman set collection variable from json response code example Example: postman environment variables pm.environment.set("variable_key", "variable_value");