Pass jq's input on the command line? #3107
-
Is there a way to pass |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes, there is $ jq -n --argjson data '{"name":"program","version":"1.2.3"}' '$data'
{
"name": "program",
"version": "1.2.3"
}
$ jq -n --argjson data '{"name":"program","version":"1.2.3"}' '$data.version'
"1.2.3" |
Beta Was this translation helpful? Give feedback.
-
Ah, I saw that [ |
Beta Was this translation helpful? Give feedback.
Yes, there is
--argjson name value