In Programming By Stealth, we’ve completed our series on the jq language and now Bart Busschots brings us a two-part miniseries about the YAML data format. He takes us through the history of data formats we’ve “enjoyed” such as fixed-width text files, Comma Separated Value files, through to JSON and XML. All of them had […]
Continue readingMore TagTag: jq
CCATP #795 — Bart Busschots on PBS 167 of X – jq: Recursion, Syntactic Sugar, Some old Friends and a Few Honourable Mentions
It was actually bittersweet for Bart and me this week as he taught the final installment in our series of Programming By Stealth about jq. As Bart says partway through our recording, he thought this would just be a few episodes but it took 13 episodes to go through everything Bart thought was fun about […]
Continue readingMore TagCCATP #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 […]
Continue readingMore TagCCATP #793 — Bart Busschots on PBS 165 of X – jq: Variables
In this installment of Programming By Stealth, Bart explains why jq is uniquely designed not to need variables (most of the time) and then explains how to use them in the few instances when there’s no other way. It’s really a fairly straightforward lesson as Bart sets up some clear examples and solves them with […]
Continue readingMore TagCCATP #790 — Bart Busschots on PBS 164 of X – jq: Working with Lookup Tables
In our previous episode of Programming By Stealth, Bart Busschots taught us how to create lookup tables with jq from JSON data using the from_entries command. Just when we have that conquered, this time he teaches us how to do the exact opposite – disassemble lookup tables. I think this was a really fun lesson […]
Continue readingMore TagCCATP #789 — Bart Busschots on PBS #163 – jq: Lookups & Records
In this episode of Programming By Stealth, Bart Busschots as usual works through his solution to the challenge from last time, and as usual I learn a lot more about how to use jq to solve problems. He takes a bit of a detour to explain a fun email we got from Jill of Kent […]
Continue readingMore TagCCATP #788 — Bart Busschots on PBS 162 of X — jq: Altering Arrays & Dictionaries
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 […]
Continue readingMore TagCCATP #787 — Bart Busschots on PBS 161 — jq: Maths, Assignment & String Manipulation
In this week’s episode of Programming By Stealth, Bart continues to expand our knowledge on how to use jq to query and manipulate JSON files. We learn how to use mathematical operators on data in our JSON files along with fun functions like floor and absolute value. I even contributed some to the learning by […]
Continue readingMore TagCCATP #786 — Bart Busschots on PBS 160 of X — jq as a Programming Language
In this week’s installment of Programming By Stealth, Bart Busschots teaches us how to use jq as a programming language. Before we get into the new stuff, Bart takes us through his solution to the challenge, and I have to say I was pretty chuffed when he said my solution to the extra credit portion […]
Continue readingMore TagCCATP #784 — Bart Busschots on PBS 159 of X – jq: Building Data Structures
In this very meaty episode of Programming By Stealth, Bart Busschots teaches us how to build data structures using jq with JSON files. We’re not just querying existing data, we’re rebuilding the data the way we want to see it. We learn how to build strings with interpolation, which I find is a very odd […]
Continue readingMore Tag