Artifact stanza from API (formulae.brew.sh)

Hi

I’m trying to read the artifact stanza from the API, e.g.:

curl -s "https://formulae.brew.sh/api/cask/atom.json" | jq '.artifacts'

I would like to grab app, pkg, suite or something to install according to https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/all_stanzas.md#at-least-one-artifact-stanza-is-also-required, but not something like trash. In the example above its easy

curl -s "https://formulae.brew.sh/api/cask/atom.json" | jq -r '.artifacts[0][]'

But the same command on blender for example fails. I don’t understand how the JSON output is built. Can anyone explain this to me?

Thanks!

1 Like

I think your best bet is to make Jq filter anything that isn’t a package instead of depending on a certain order.