go-jira / jira

simple jira command line client in Go
Apache License 2.0
2.67k stars 326 forks source link

GJSON / `gjq` doesn't appear to work with query paths #485

Open Honest-Objections opened 1 year ago

Honest-Objections commented 1 year ago

As per the docs, the following works as expected:

jira view JIRAT-1234 --gjq 'fields.issuelinks.#.id'
# ["123456"]

A trivial example, which you would expect to output 123456 returns nothing but a new line

jira view JIRAT-1234 --gjq 'fields.issuelinks.#(id=="123456").id'

This would be crazy powerful! I hope someone can tell me what I'm doing wrong, but I have tried a lot of variations