Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jq's .[] filter doesn't work #49

Closed
OliverJAsh opened this issue Dec 16, 2016 · 4 comments
Closed

jq's .[] filter doesn't work #49

OliverJAsh opened this issue Dec 16, 2016 · 4 comments

Comments

@OliverJAsh
Copy link

The .[] filter works fine in jq:

❯ echo '[{"id":1},{"id":2}]' | jq '.[]'
{
  "id": 1
}
{
  "id": 2
}

But returns null in jid.

Is there any reason for this? I couldn't spot any explanation in the documentation.

Thanks!

@fiatjaf
Copy link

fiatjaf commented Dec 16, 2016

jid is not jq, it uses its own parsing and filtering mechanism.

If you want jq's filters, try jiq, a jid's fork that actually uses jq behind the scenes.

@OliverJAsh
Copy link
Author

Thanks!

@OliverJAsh
Copy link
Author

The README makes it sound like it uses jq internally, or at least has parity:

You can drill down JSON interactively by using filtering queries like jq.

May I suggest we include a note to say it is not the same?

@hderms
Copy link

hderms commented Dec 11, 2019

@OliverJAsh I thought it would use jq syntax based on the blurb at the top

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants