-
input:
command:
output
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
It's not valid json syntax. I guess you have to change it to valid json file before feeding to dasel. The syntax of your data is very similar to hjson. In fact, you just need to put them in a pair of [ and ] to make them valid hjson. Then you can easily convert to json syntax. For example, I put your data in a file qq2.json.
Put them in a pair of square brackets:
Convert to valid json.
And process it with dasel
|
Beta Was this translation helpful? Give feedback.
-
Dasel treats a newline in JSON as a separate document, similar to the You need to use the --merge-input-documents flag. Example: $ echo '{
"_id" : "6001c87baff07b000760f696",
"title" : "Acme Demo Company Risk Review",
"description" : "Acme Demo"
}
{
"_id" : "6005a424aff07b0007619253",
"title" : "Acme Industries",
"description" : "Demo Quick"
}' | dasel -r json -w csv --merge-input-documents
_id,description,title
6001c87baff07b000760f696,Acme Demo,Acme Demo Company Risk Review
6005a424aff07b0007619253,Demo Quick,Acme Industries |
Beta Was this translation helpful? Give feedback.
Dasel treats a newline in JSON as a separate document, similar to the
---
separate in YAML.You need to use the --merge-input-documents flag.
Example: