ArthurSonzogni / json-tui

A JSON terminal UI made in C++
MIT License
353 stars 16 forks source link

ability to filter json contents with Json Path #30

Open goutham2688 opened 8 months ago

goutham2688 commented 8 months ago

Thank you for the library. Do you think adding ability to filter the json contents interactively. Fits in the scope for json-tui?

https://github.com/brunerd/jsonpath?tab=readme-ov-file#jsonpath-syntax

ArthurSonzogni commented 8 months ago

Sounds like a good idea!

I am reading JSON using nlohman::json. It supports JSON pointer: https://github.com/nlohmann/json?tab=readme-ov-file#json-pointer-and-json-patch but it doesn't support JSON path.

I guess the easiest way to support this feature would be to move toward: https://github.com/danielaparker/jsoncons

yurenchen000 commented 2 months ago

or jq filter maybe ? https://jqlang.github.io/jq/tutorial/

a input box to edit the filter so that don't have to tune jq filter in cmd again and again

and it'll perfect if the input support autocomplete