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

Add iterator #14

Open
macdabby opened this issue Feb 23, 2018 · 1 comment
Open

Add iterator #14

macdabby opened this issue Feb 23, 2018 · 1 comment

Comments

@macdabby
Copy link

It would be great to have a .each(func(interface{}, string)) method that would pass each value and key to a closure. I'll do my best to add this.

@macdabby
Copy link
Author

(sorry i'm sort of a go noob)

it looks like this might not be necessary, maybe the following would work:

for i, v := range jq.Array("some", "array") {
    ....
}

And same with jq.Object()

It that works, it would be great to add that to the docs

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

1 participant