-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Parallel Arrays to Objects #609
Comments
|
It seems to me that you're looking for a version of the typical For obtaining the inputs and outputs you specified, here's a simple jq snippet, using
|
@pkoppstein the reduce worked! and it's a great example of how to use the reduce and do some tricky stuff. Thanks! |
@vito-c No idea when it was introduced, but it's been on master for a while. I seem to recall it being on 1.4, but I'm probably wrong about this. |
Transpose is new in 1.5, which is currently just master. On Thu, Oct 30, 2014, 15:51 vito-c notifications@github.com wrote:
|
Ah ic time to: brew update; brew uninstall jq; brew install jq --HEAD |
For the record, this one solves the general case:
And you would use it as follows:
|
@slapresta where do I need to put these defines so that they are picked up by my commandline jq? |
IIRC you could put them at |
@slapresta is it possible for me add tags to issues? I'd like to look through some of the issues and tag them as examples or use cases |
If not let me know what tags for what issues (open an issue for it, even) |
I have tried a number of things to convert these two arrays into an object but haven't had much luck. I was thinking maybe I could add an index counter and then map off that but I don't even know if there is a way to do that. Thanks :)
The text was updated successfully, but these errors were encountered: