thunder-client-support
thunder-client-support copied to clipboard
JSON Path queries
Describe the solution you'd like Insomnia offers a way to filter the response using JSON Path. It would be great if the Thunder Client had a similar feature.
Hi @Rzublin can you post a clear example for my understanding, and what is the usecase and how it’s useful to you.
@rangav I would also find this feature useful.
Basically, it allows to filter JSON response body using JSON Path.
For example, imaging a huge GeoJSON (I am assuming you are familiar with GeoJSON format) FeatureCollection. If a user would like to view/copy only certain properties from large response he could type $.features[*].properties.name
and the live preview of the body would show a flat array of names from deeply nested features[].properties.
If my explanation is confusing (it most likely is), then just download Insomnia, make a request to any JSON data and use the very bottom right field to filter the json response in real-time.
I am interested in this too. Is there an easy way to do this? I figured I could just Ctrl-F and it would do jsonPath or something
@rangav This feature would be very helpful for a lot of developers
@FaiyazMujawar we already support standard json queries
see here https://github.com/rangav/thunder-client-support/releases/tag/v2.0.2
And also supports filters
for advanced operations
https://github.com/rangav/thunder-client-support/blob/master/docs/filters.md
I'd love to be able to use JSONpath expressions for fitlering a JSON response, too.
Currently, as I understand it (please correct me if I'm wrong), the "filter" functionality of ThunderClient is tied to tests/testing.
However, I don't want to test if a certain thing is present or the count is right etc.
I just want to be able to apply some kind of search pattern (and JSONpath allows for many fancy things here) to extract the things I'm interested in from the JSON response – and save that to a file or open it directly in a new VSCode tab.
Also, the JSONpath expressions I would apply to a response should be saveable because I don't want to type them in every time again. 😉
Live preview of applying a JSONpath expression would be neat and helpful, too.