Skip to content

Commit 34f83d2

Browse files
committed
Added description of -ijq
1 parent 35db53a commit 34f83d2

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

README.md

+5-14
Original file line numberDiff line numberDiff line change
@@ -469,26 +469,17 @@ menu.json
469469
}
470470
```
471471

472-
Normally it is a 1 column table as it is.
473-
474-
```console
475-
trdsql -oat 'SELECT * FROM menu.json'
476-
```
477-
478-
```
479-
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
480-
| menu |
481-
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
482-
| {"id":"file","popup":{"menuitem":[{"onclick":"CreateDoc()","value":"New"},{"onclick":"OpenDoc()","value":"Open"},{"onclick":"SaveDoc()","value":"Save"}]},"value":"File"} |
483-
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
484-
```
485-
486472
You can write a jq expression by connecting :: after the json file name.
487473
Enclose the jq expression in double quotes if needed.
488474

489475
```console
490476
trdsql -oat 'SELECT value, onclick FROM menu.json::".menu.popup.menuitem"'
491477
```
478+
Or specify with the `-ijq` option.
479+
480+
```console
481+
trdsql -oat -ijq ".menu.popup.menuitem" "SELECT * FROM menu.json"
482+
```
492483

493484
```
494485
+-------+-------------+

0 commit comments

Comments
 (0)