Hi,
May I get some help with using the proper parse and/or setEnvironmentVariable so that I can write a needed value to my environment variable?
I’m getting a response of
[
{
"A": "B",
"C": "D",
"E": [
"F1:F2",
"G1:G2",
"H1:H2"
],
"I1": "I2",
"J1": "J2"
}
]
I’m thinking that my postman.setEnvironmentVariable(“F”, );
I’ve tried
var jsonData = JSON.parse(E[0].F1);
postman.setEnvironmentVariable(“serviceTypeId”, jsonData[1]);
but it’s not working.
I know that the var statement isn’t quite correct. What should it be? I probably don’t have the setEnvironmentVariable statement correct either.
help!
thanks,
Tien