-
|
Is there any way to do something similar in fx? $ jira issue view ISSUE-12345 --raw | jq '{key: .key, summary: .fields.summary, priority: .fields.priority.name, fixVersions: .fields?.fixVersions[]?.name // "develop", parent: .fields?.parent?.key // "" }'I want to select multiple fields from JIRA but can't find out how to enumerate multiple fields. And some fields are optional |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
You can absolutely achieve something similar in fx! Here’s how you can rewrite your jq command using fx to extract and format multiple fields from a raw JIRA JSON response, including optional fields with defaults. Assuming you’re using jira issue view ISSUE-12345 --raw | fx, here’s an fx expression that mimics your jq logic: If you’re reading from stdin, the full command would be: |
Beta Was this translation helpful? Give feedback.
You can absolutely achieve something similar in fx! Here’s how you can rewrite your jq command using fx to extract and format multiple fields from a raw JIRA JSON response, including optional fields with defaults.
Assuming you’re using jira issue view ISSUE-12345 --raw | fx, here’s an fx expression that mimics your jq logic:
If you’re reading from stdin, the full command would be: