I have a GET request which returns an array of bodies:
[
{
"id": "79ad1daf-54f0-49cf-8628-7fb38457fdd1",
"deviceId": "wowSomeRandomName",
"deviceName": "wowSomeRandomName",
"iconUrl": "/i/devicepics/smart_tv.svg",
"lastUse": "2018-12-13T10:05:00.609Z"
}
]
And I need to set these variables as global variables. I understand how to do that for external bodies outside of an array:
pm.environment.set("deviceUUID", pm.response.json().id);
pm.environment.set("deviceId", pm.response.json().deviceId);
pm.environment.set(. . . .);
and etc.
But what to do when they are inside of [ ]?