Json – Using if-then-else-end in jq to handle missing values
This is the command I use to pull the info I need: .results | .[] | {id, name: .general.name, platform: .general.platform, site: .general.site.name, ea_site: .extensionAttributes.[] | select(.definitionId=="57").values.[]} When .extensionAttributes.[] | select(.definitionId=="57").values.[] is empty, jq does not display any associated items…