PBS logo: a tiny ninja with a pale face surrounded on either side by two squiggly brackets denoting programming. Get it? Ninja is stealthy!

CCATP #794 Bart Busschots on PBS 166 of X — jq: Processing Arrays & Dictionaries sans Explosion

In this penultimate jq episode of Programming By Stealth, Bart introduces us to three new ways to process arrays and dictionaries without exploding them first. I know that sounds crazy – we’ve always exploded our arrays first. He teaches us how to use the reduce operator which lets us take an entire array or dictionary and reduce it down to one thing. The map function lets us process every element in an array (or or values in a dictionary) and return a new array. Finally, map_values lets us apply a function against all of the values in a dictionary (or an array).

It was a bitter sweet ending to the primary series on jq for Bart, but next time he’ll do the epilogue where he’ll introduce us to some rarely needed but still very useful things you can do with jq.

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

mp3 download

Read an unedited, auto-generated transcript with chapter marks: CCATP_2024_05_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!

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top