This could be done with nushell. https://www.nushell.sh/commands/docs/from_json.html
Is the output ascii diagram only? Seems like a pretty different use case
Fx – Terminal JSON Viewer
41–50 of 80 posts
Re: Fx – Terminal JSON Viewer
#42Having used https://jqlang.github.io/jq/ , wondering your pitch on advantages, alternative use cases for using fx?
Happy jq user as well. But is jq interactive?
Re: Fx – Terminal JSON Viewer
#43Having used https://jqlang.github.io/jq/ , wondering your pitch on advantages, alternative use cases for using fx?
Re: Fx – Terminal JSON Viewer
#44Earlier quoted context omitted.
wow nice, I'll give this a try. I've always used jq for viewing json, but it's the wrong tool for my use. I basically want to explore json interactively, not parse it specifically. So the workflow is to keep "jq"ing it, and modifying my jq query until I find what I'm looking for. Your tool looks like it allows interactive exploration.
You may be interested in an interactive jq tool like jiq or others: https://github.com/fiatjaf/awesome-jq (do a ctrl-f for "interactive" on this page).
Re: Fx – Terminal JSON Viewer
#45What is the website https://fx.wtf/ built-in?
Re: Fx – Terminal JSON Viewer
#46Earlier quoted context omitted.
The project supports JS scripts as arguments to process the data: https://fx.wtf/getting-started#json-processing It's hard to tell from the docs if there is any JS involved if you just pipe JSON data to fx. I would hope not, since it mentions being written in Go for performance.
This is what I was wondering as well. Is there an interpreter built into the go binary? or is it using my node install under the hood? Edit: Answered my own question. I installed it into a podman container with nothing else in it, and it printed this when trying to execute js: Node.js or Deno is required to run fx with reducers.
Re: Fx – Terminal JSON Viewer
#47> echo '{"name": "world"}' | fx 'x => x.name' 'x => `Hello, ${x}!`'
Wow, that is so nice. Having to memorize JQ syntax is such a pain.
Re: Fx – Terminal JSON Viewer
#48Earlier quoted context omitted.
Not OP but echo '{"name": "world"}' | fx 'x => x.name' 'x => `Hello, ${x}!`' Is immediately grokkable compared to jq's syntax. I love jq, I think it's extremely powerful, but I have to load up the documentation in a side window every time I have use it.
Equivalent jq seems okay here: echo '{"name": "world"}' | jq '"Hello \(.name)"'
Re: Fx – Terminal JSON Viewer
#49Very cool. Not a huuge deal, but for open source software, I don't totally appreciate the http call to a bitly tracker in the install script...
go install github.com/antonmedv/fx@latestRe: Fx – Terminal JSON Viewer
#50Earlier quoted context omitted.
You may be interested in an interactive jq tool like jiq or others: https://github.com/fiatjaf/awesome-jq (do a ctrl-f for "interactive" on this page).
That page doesn't include jless[1], which seems very similar to fx and will give you a jq selector for whatever node you're on 1: https://jless.io/