Mattias Wadman
Mattias Wadman
Maybe these could be interesting also: https://github.com/fadado/JBOL/blob/master/doc/JQ-language-grammar.md https://github.com/fadado/JBOL/blob/master/doc/JQ-Distilled.md
Can't reproduce with master and seems the fixing is only in master yet https://github.com/stedolan/jq/commit/6d3d2750ec1e076cd86189b8fcfe1b760e2207c7
@wtlangford Thanks for all hard work. Im also willing to help out with review, documenting, testing and whatnot
I think @itchyny has shown lots of motivation and knowledge, so he would get my vote if he would agree to lead. I'm also happy to help out with various...
Could you post an example with input, query, actual and expected output? But sounds like you want `?` or `try`.
Something like this? ```sh $ echo '[{"commit": {"sha": "sha"}}]' | jq '"[].commit.sha=\(.[].commit.sha)"?, "array[1]=\(.array[1])"?' "[].commit.sha=sha" $ echo '{"array": ["a", "b"]}' | jq '"[].commit.sha=\(.[].commit.sha)"?, "array[1]=\(.array[1])"?' "array[1]=b" ``` `?` is a short hand...
I guess change template.txt to: ``` "[].commit.sha=\(.[].commit.sha)"?, "array[1]=\(.array[1])"? ```
A bit cryptic maybe but this probably works: ``` "[].commit.sha=\(.[].commit.sha | values)"?, "array[1]=\(.array[1] | values)"? ``` It could probably be made more readable and explicit by moving out the filters...
You can pipe the json on stdin and provide the filter as an argument
Sorry i'm not a windows user that much and not sure i follow how you invoke jq