Ability to filter JSON or XML
See original GitHub issueSometimes API responses contain a lot of data.
Given an endpoint that returns JSON or XML, it would be cool to be able to do something like
http http://myapi.endpoint/ -q "abc/xyz"
and only get to see the “abc/xyz” sub-tree of the response.
Issue Analytics
- State:
- Created 9 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Ability to filter JSON or XML · Issue #291 · httpie/httpie - GitHub
Given an endpoint that returns JSON or XML, it would be cool to be able to do something like http http://myapi.endpoint/ -q "abc/xyz"...
Read more >A Deep Look at JSON vs. XML, Part 1: The History of Each
Numerous articles insist that JSON is superior to XML due to its terse semantics and discount XML as an inefficient and confusing standard...
Read more >QUERYING JSON AND XML - DiVA Portal
querying functions in JSON and XML to filter values from a dataset and then display them through the HTML5 canvas technology.
Read more >Javascript form filter based on json or XML to make option boxes
I am trying to think up a filter method based on AJAX, XML or Json. I would like to hear from anyone who...
Read more >Parse text as JSON or XML (Power Query) - Microsoft Support
To help illustrate how to use the Parse command, the following sample data starts with JSON and XML data entered as text fields....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m afraid this is slightly beyond the scope of what httpie should support.
jq
for JSON is excellent and integrates well with HTTPie via pipes. I’m planing on adding some examples to the docs, but here is a simple one for now:And other tools exist for querying different formats.
Here’s another example of using jq; this one happens to also use httpie-unixsocket to communicate with Docker over
/var/run/docker.sock
: