Programming By Stealth

PBS 162 of X — jq: Altering Arrays & Dictionaries

Programming By Stealth

Show Notes

Bart Busschots is back to teach us how to alter arrays and dictionaries in JSON files using jq. Bart went through his challenge solution on cleaning up the Nobel Prize database and I learned a lot from it. Maybe he'd already taught all of it to us before but I sure wouldn't have been able to put the pieces together.

For the new content, we learned how to alter arrays. We mastered sorting and reversing, how to add and remove elements, how to deduplicate the values within, and how to flatten even nested arrays. From there we learned how to manipulate dictionaries by adding and removing keys.

It's a very focused lesson that continues to show how powerful the jq language is. I think my favorite part though was when Bart made an existential philosophy observation when he said "Everything exists with the value of null."

You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

More from Programming By Stealth

Oct 11, 2026

We dust off our memory from where we left off learning about Jekyll back in PBS 181 in June of last year. After some housekeeping, Bart takes us through the challenge solution from PBS 181, and then teaches us how to add metadata to our static sites. After the new material, he sets up where we're going next in learning how to organize our content with Jekyll taxonomies. He even explains what the weird term "information architecture" means in this context.

Sep 26, 2026

In this final episode of Tidbit 19, Bart walks us through the very few libraries he used for the final design of his Linkifier CLI App. His choices on tooling to build nice terminal commands and provide color in the terminal (like red for error messages) were based on simplicity, the fewest dependencies, and active support. It was a very fun episode to record as he wrapped the entire story up in a bow.

Aug 30, 2026

We're back with Part B of Tidbit 19, where Bart walks us through the architecture of his Linkifier module. He starts with the three data modeling classes that he's been using for decades, but explains how hard it is today to extract article headlines. He walks through how he developed an extraction logic but had to do it per domain. That sounds crazy but he uses surprisingly few sites for his articles for Security Bits and Let's Talk Apple.

Aug 11, 2026

In Part A of Tidbit 19, Bart explains the problem he needed to solve, which was bringing a script he's written up into the modern age as a JavaScript command-line interface app that can help navigate the AI landscape. As always, his explanation is geared towards teaching us the fundamentals with his problem as the example.

Jun 28, 2026

One of the things that helps your posts get traction is if you have a nice, pretty card that displays when you post the URL on social media. Plain blue links just don't get clicked. With WordPress and other dynamic Content Management Systems (CMSs), you can get plugins to create the pretty cards. But with Jekyll (and Hugo and other Static Site Generators), you need to build the capability into your theme. It's not hard, you just need to know what metadata to build, and of course, Bart is here to teach it to us.

See all episodes →