An open-data portal returns nested JSON for streetlight outage records. A night job must pull only the outage status field from each object. Which CLI tool is designed for that extraction?
Select an answer to reveal the explanation.
Short Explanation
Use jq as the JSON scalpel—point it at the nested status field and it lifts just that value. Ping and chmod keep the lights on elsewhere; they don't parse API JSON.
Full Explanation
Open-data portals often return nested JSON for streetlight outage records. A night job that must pull only the outage status field from each object needs a JSON-aware extractor. jq is designed for that: it parses JSON and selects nested fields with a compact expression language suitable for shell automation. Using jq to extract the nested outage status field yields clean values for downstream alerting or ticketing without ad-hoc string chopping. Ping measures latency to a CDN or host; it does not parse JSON response bodies or extract outage status fields. Chmod changes file permissions after download; permissions matter for access control but do not extract nested JSON properties. Fsck repairs filesystem consistency; it is unrelated to parsing API JSON and must not be part of a routine outage-field extraction path. Exam caveat: handle empty arrays, missing keys, and API pagination; jq expressions should tolerate absent status fields with explicit defaults or filters so one bad object does not abort the entire municipal night job. Operational check: save a sample portal response, run the jq filter, assert only status values emerge, compare counts to the number of outage objects, and integrate the filter into the scheduled job with logging when extraction returns fewer records than expected.