Filter JSON Get output within body?

Describe the bug
Hello, I have a question to ask as I’m rather new with using Postman. Is there a way to filter the sections (not sure if this is the right terminology) of a GET response? Currently I’m grabbing data in JSON format from a report and it’s presented in various sections. The data that I need however is only in one section, “pages”. What would be the best way to filter everything else out and only present the pages section in the body? Again, I apologize if I’m not using the correct terminology.

Expected behavior
What I’m hoping to have is to only get the body to display the pages section of the report I’m grabbing with my GET request. I would like everything else to not be shown.

Screenshot
Capture18
Thanks for any assistance and sorry if this is a silly question to ask.

Are you calling an endpoint that you wrote?

If so, you’re going to have to change the code to do what you want. Maybe have a query parameter in there to specify what fields you want returned.

If you did not write the endpoint you’re calling, you’re out of luck. You could always grab the pages element and print it in the console, but beyond that, it’s not something you can do with postman.

1 Like

I’m actually looking to do the same thing. It’s my companies API I’m working with, however not 100% if we have the query parameter.

How would I do this but to only give me the needed information in the console?

Hey @jamie.mccallum :wave:

Do you have access to the source code or documentation for the API?

All Postman does is call APIs, you can’t manipulate the data that is returned in the response. That’s the responsibility of the API.

I would start with looking at the documentation and seeing what query parameters it supports.