Parsing Response with missing identifier

I use postman for running REST api’s over JD Edwards E1 and have coded a number of test scripts to format the Json responses into easy to read tables for our support staff.

To do this I usually code the response values as {{response.identifier1.identifier2}} and everything comes out fine.

However, one particular api gives a response like:

[ { identifier: “value” } ]

No matter how I code it, I can’t get a value out. I have tried:

{{response.identifier}}
{{response.NULL.identifier}}
{{identifier}}
{{NULL.response.identifier}}
etc

But nothing seems to work. Is there something I’m missing?

Thank’s in advance
Jonathan

Hi @astradyneuk

[ ] are an array so try referencing the index.

Example;
response[0].identifier

Thank you for the suggestion, I tried and got a parse error:

Parse error on line 24:
...>            {{response[0].jobname}
----------------------^
Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'

Just tried changing it to

response.[0].identifier

and it worked. Thank you so much for your help.

1 Like