ljos / jq-mode

Emacs major mode for editing jq queries.
GNU General Public License v3.0
110 stars 12 forks source link

csv output isn't formatted as a table #37

Closed johanwk closed 10 months ago

johanwk commented 1 year ago

When the jq block ends with @csv, somehow the results aren't converted into a table in org-mode, but returned as quoted and comma-separated strings. Adding :results table doesn't help. Is this just me?

Using: Emacs 29.1 on Windows, org 9.6.10, jq-mode-20230823.1003.

omidmnz commented 12 months ago

@johanwk If you return a list of objects (all sharing the same keys) and specify :results table, you will get an org table with a header (using the keys as headers). No need to convert them using @csv.

johanwk commented 10 months ago

Sorry about this late reply -- thanks for explaining how it's supposed to work!