in the test for a Get by Id request I am doing this on an int? datatype property:
var r = pm.response.json();
pm.environment.set(“initialValue”, r.positionTypeID);
often r.positionTypeID returns null:
{
…
“positionTypeID” : null
…
}
in a Patch request:
{
…
“positionTypeID”: {{initialValue}},
…
}
my request fails because the patch request is:
{
…
“positionTypeID”: “”,
…
}
instead of “positionTypeID”: null,
How do I get the variable “positionTypeID” to return null instead of “”?