[kwlug-disc] Extracting data from JSON file

John Sellens jsellens at syonex.com
Sat Jul 20 22:25:50 EDT 2019


On Sat, 2019/07/20 07:00:49PM -0400, Khalid Baheyeldin <kb at 2bits.com> wrote:
| It works. More complex stuff is harder though, since as you say,
| syntax is weird.
| 
| I have since moved on, and used a Python program with Python's JSON library.

I write a lot of shell scripts.  A lot of them.

I needed to deal with json files and manipulate them.
I wanted to use jq.

But similarly to Khalid's experience, for non-trivial JSON stuff I
use another language with better primitives. Or at least ones that I
like better.

(In my case, PHP since we use it a lot, and jsonencode() jsondecode()
and then fiddle with PHP arrays.)

jq is really cool, but one might fairly say that the syntax is a
little idiosyncratic.

John




More information about the kwlug-disc mailing list