After the last episode of Programming By Stealth where Bart gave us an intro to jq and the problems it can solve, this week we start to get our feet wet by learning how to extract data from JSON files. We learn how to descend into dictionaries and arrays, and how to slice arrays. Learn how jq will output sarcasm about “Bart Busschots” if you don’t learn how to ask it for raw output. We even learn how to extract data from multiple files at once and how to extract multiple values from our JSON files. Finally, we learn about exploding arrays and how to suppress errors.
I think I really love data manipulation because I loved this episode.
You can find Bart’s fabulous tutorial shownotes at pbs.bartificer.net.
Read an unedited, auto-generated transcript: CCATP_2023_11_25
Join our Slack at podfeet.com/slack and look for the #pbs channel, and check out our pbs-student GitHub Organization. It’s by invitation only but all you have to do is ask Allison!