Flattening nested JSON objects with jq
I wanted to take a nested set of JSON objects and import them into a SQLite database using - but I wanted to "flatten" some of the nested rows.
10 posts tagged “jq”.
I wanted to take a nested set of JSON objects and import them into a SQLite database using - but I wanted to "flatten" some of the nested rows.
I just watched a talk by Pamela Fox at North Bay Python on Automated accessibility audits. The video should be up within 24 hours.
I just spent way too long messing around with ChatGPT (transcript here) trying to figure this out. After much iteration, here's a recipe that works (mostly written by me at this point): The output…
Matt Holt asked: Is there a tool that uses the GitHub API to generate a doc with all release notes from a repo?
http://radio.garden/ is an amazing website which displays a 3D globe covered in radio stations and lets you listen to any of them. I wanted to have a play around with their data.
Input: I want an array of objects. Here's what I came up with, using jqplay.org: This outputs: If you remove the outer and and use the "Compact output" option you get back this instead:
I save things like API keys in 1Password. Today I figured out how to access those from macOS terminal scripts.
The Algolia-powered Hacker News API returns nested comment threads that look like this: https://hn.algolia.com/api/v1/items/27941108 (For this story: https://news.ycombinator.com/item?id=27941108) I…
The Airtable API outputs JSON that looks like this: The items in the array each have an , a nested dictionary and a .
I had some data with weird co-ordinates in it: Note the and in there. I know that this data refers to somewhere in Houston, and a few people on Twitter pointed out that it's actually really simple…