Hey all, I have the ultimate honor of testing/debugging an API that answers with some kind of json structure, example below:
{
"m2m:ae": {
"rn": "CAE1c8f40f0-56bb-48b7-8dd4-0f64ee1767e0",
"pi": "cse-test",
"ri": "/cse-test/cae4d7c0cdb-08ad-4e48-af32-38128e37b066",
"api": "Lightman",
"lbl": [
"Manually registered endpoint"
],
"ty": 2,
"ct": "20201102T110311",
"rr": "false",
"poa": [
"http://localhost:8686/~/engineering/datasource"
]
}
}
And now I’m stuck trying to access eg the value of “ri”, and have no clue how to reference the m2m:ae-part… I tried
postman.setEnvironmentVariable("id", jsonData.m2m.ri);
postman.setEnvironmentVariable("id", jsonData.m2m{"ae"}.ri);
and alike, but to no avail… Even Auntie Google won’t help me with named nested json objects…