question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Use jq for JSON filters

See original GitHub issue

JSON filters on Insomnia are pretty useful, but there’s some cases that aren’t (nicely) covered by it. I have to regularly interact with APIs that return arrays of big JSON objects (40+ properties) of which I usually need a small subset of fields. JSON path allows you to do $.results[*]["asd","id"] but that prints an array with no keys which is confusing when the types of the fields are similar.

jq is really powerfull JSON processor which can transform just about any JSON input to any output you can imagine (while being really really fast). The query .results[] | {asd, id} would produce an array of objects with the proper keys, instead of simply the values.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:21
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
dimitropouloscommented, Apr 6, 2021

I’m gonna resurrect this and commandeer it for keeping track of these things.

In my mind, since the jsonpath libraries have mostly been abandoned since the time they were first introduced into insomnia and jq has since come a long way, I think this is a viable thing to explore now.

3reactions
admodrascommented, Jun 5, 2021

would like to keep this issue open if at all possible. There has been a larger need to be able to use JQ within insomnia and think this would be an extremely valuable addition to this product.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Feature Request] Use jq for JSON filters · Issue #777 - GitHub
I have to regularly interact with APIs that return arrays of big JSON objects (40+ properties) of which I usually need a small...
Read more >
Guide to Linux jq Command for JSON Processing - Baeldung
jq is built around the concept of filters that work over a stream of JSON. Each filter takes an input and emits JSON...
Read more >
Using JQ to Process JSON on the Command Line - Linode
jq is a command-line utility that can slice, filter, and transform the components of a JSON file. Many users rely on jq to...
Read more >
An Introduction to JQ - Earthly.dev
jq lets us treat the JSON document as an object and select elements inside of it. Here is how I filter the JSON...
Read more >
JSON on the command line with jq - George Ornbo
Because jq is UNIX friendly it is possible to pipe data in and out of it. This can be useful for using jq...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found