antonmedv / fx

Terminal JSON viewer & processor
https://fx.wtf
MIT License
19.08k stars 438 forks source link

feature: function-builder for viewing multiple values #147

Closed ahillio closed 2 years ago

ahillio commented 4 years ago

If I have a tree of many objects I can create a view of multiple values like so: .data.map(x => ({name: x.customer_name, due: x.amount_due, work: x.lines.data[0].description}))' What would be really great is a way to build that function without having to type the whole thing...

In issue: Display current path #97 there's the possibility fx to display the .data[].lines.data[0].description part and I would like to do something that might utilize that feature...

A command Ctrl+S (or some other logical mapping) to enter into "function builder mode" (or whatever you'd call it) where you can then use J/K arrow keys to move through the data tree and hit a key, maybe S, to select items for the function... so you could scroll through a single object, marking the data values that you want to see, then hit Enter and have the function filter all the objects down to the data you just selected.

antonmedv commented 2 years ago

I rewrote the entire fx in golang. So I belove this issue is no longer needed.