Get a response on a variable

Hey @gabriel.concheto

Welcome to the community :trophy:

It looks like the response body is an array that contains objects. You would need to reference which object you want to get the information from or it won’t know where to look. :slight_smile:

As the property you need is in the second object, you need to reference that by specifying the index location. It’s zero indexed so the second one would be [1].

From your example code, you could do this to get that value:

response[1].report_id

You can find more information about accessing JSON from a response body here:

*Post edited to reference the correct value - my bad :grimacing:

1 Like