TheDcoder TheDcoder - 3 months ago 7
JSON Question

What is the correct syntax for jq?

Is there a commandline documentation to use

? I am currently running this command:

%jq% -f JSON.txt -r ".sm_api_content"

It is supposed to read from
and to output the value of
(which is a string).

But I am getting this error:

%jq% -f JSON.txt -r ".sm_api_content"

Can anyone help me out here?


-f is for specifying a filename to read your "filter" from - in this case .sm_api_content

It sounds as if you just want to run jq normally e.g.

jq -r .sm_api_content JSON.txt