I am getting my output in (YYYY-MM-DD). i want to save to an environment variable by changing the date format to MMM-DD-YYYY (Feb-26-2020)
Sample response:
{
"pickupDate": "2020-02-26",
"cutOffTime": "20:00:00",
"accessTime": {
"hours": 1,
"minutes": 0
},
}
Using below just to save the date as it is. But help me to change and save it.
var jsonData = JSON.parse(responseBody);
postman.setEnvironmentVariable("day1", jsonData.output.options[1].pickupDate);