Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to get jq output without extra characters?

When i can get result in jq with this input data

await CLI.mount({
    name: "test.json",
    data: JSON.stringify([{some:{data: {test: 'data'}}}, {some: {data: "there"}}])
});

I am getting correct output but with characters not recognized by the system.

Output of jq:
[1;39m{
  [0m[34;1m"test"[0m[1;39m: [0m[0;32m"data"[0m[1;39m
[1;39m}[0m

How can I get an output file without extra characters ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I looked at all the flags in the manual but did not find what would help me.

>Solution :

The -M command-line option suppresses the kind of extra characters you mention. If you want complete control over the STDOUT output, consider using the -c and -j command-line options, which together suppress everything that isn’t explicitly sent to STDOUT. (But see the manual for details.)

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading