Postman request body update on conditional basis

I have a request body as below:
“accessInfo”: {
“serviceKey” :“gfdgfdg4545435fdgdfg”,
“accessChannel”: “MTSMS”,
“referenceCode”: “{{randInt}}” ,
“serviceIdentifier”: “49330012001”

I have to run the above API with collection runner for multiple cases. So for one case i have to pass empty string in enduser id, and in another case i have to remove this completely from the body so in prerequest script am deleting the value on conditional basis.

var reqData = JSON.parse(;
delete reqData.accessInfo.endUserId;
request.body=reqData; ;

In console it is printing with out that element but in API request this element is appending. Can you please let me know how we can change the request body in pre request or before API process.
thanks in advance