Gron - Make JSON greppable!

a version of gron in a simpler language (closer to js, perhaps at least much of the “logic” fuc def etc…)

https://raw.githubusercontent.com/xonixx/gron.awk/refs/heads/main/gron.awk

lines:361
functions:67

.github.com/xonixx/gron.awk (’.’ off click lol)

the original version

.github.com/tomnomnom/gron (go.lang)

gron transforms JSON into 
discrete assignments 
to make it easier to `grep` for what you want 
and see the absolute 'path' to it. 
It eases the exploration of APIs 
that return large blobs of JSON 
but have terrible documentation.

grep means "global regular expression print"

see also : https://groups.google.com/g/tiddlywiki/c/j3h2AM6Ixes

Grep like function in TW5 possible?

What i am looking for however is a way to only display the “lines” that contain the search string.

Eucaly’s matchfilter plugin does the trick and allow to act like a grep. See discussion here
annoying redirect.groups.google.com/g/tiddlywiki/c/ZKPAwN7e-5E/m/yIlgew9FAQAJ
to
Eucaly's Tiddly World — – powered by TiddlyWiki (v5.1.0)

so if gron-like functionality could be ported into a plugin…

eg

gron "https://api.github.com/repos/tomnomnom/gron/commits?per_page=1" | fgrep "commit.author"
json[0].commit.author = {};
json[0].commit.author.date = "2016-07-02T10:51:21Z";
json[0].commit.author.email = "mail@tomnomnom.com";
json[0].commit.author.name = "Tom Hudson";

(re) turn your filtered data back into JSON

gron "https://api.github.com/repos/tomnomnom/gron/commits?per_page=1" | fgrep "commit.author" | gron --ungron
[
  {
    "commit": {
      "author": {
        "date": "2016-07-02T10:51:21Z",
        "email": "mail@tomnomnom.com",
        "name": "Tom Hudson"
      }
    }
  }
]