diff options
author | JJ <nicetry@noemail.com> | 2025-03-19 14:56:26 +0000 |
---|---|---|
committer | JJ <nicetry@noemail.com> | 2025-03-19 14:56:26 +0000 |
commit | 16f52b7bef745097f7076dde76715db378b54343 (patch) | |
tree | cfcacda8adced2059dcc120d2bc2446d3c4f960a /content/snippets/jq-convert-jsonl-json.md |
first commit
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 +``` |