diff options
Diffstat (limited to 'content/snippets/jq-convert-jsonl-json.md')
-rw-r--r-- | content/snippets/jq-convert-jsonl-json.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/content/snippets/jq-convert-jsonl-json.md b/content/snippets/jq-convert-jsonl-json.md new file mode 100644 index 0000000..b58a021 --- /dev/null +++ b/content/snippets/jq-convert-jsonl-json.md @@ -0,0 +1,15 @@ +--- +title: Convert JSONL to JSON using JQ +description: Convert JSONL to JSON using JQ +tags: ["jq", "commandline"] +--- + +```console +jq -s '.' input.jsonl > output.json +``` + +And the other way: + +```console +jq -c '.[]' input.json > output.jsonl +``` |