Using jq to understand large Mechanic operations

For large Mechanic results, whether you're generating actions or logs, no automatic summary will be as flexible as a manual query for exactly the data you're looking for.

For this purpose, we recommend pairing event exports with jq, a tool for processing JSON.

As Mechanic staff, we'll be using this page ourselves, to catalog the jq commands we find useful whenever we're inspecting exported events.

Count all action runs for an event whose options include the string "metafields"

cat event.json | jq ".event.task_runs[].action_runs[] | select(.action_options | contains(\"metafields\"))" | jq -s ". | length"

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.