Al definir un documento JSON, los campos pueden tener diferentes tipos, como string
, number
, boolean
, etc… Sin embargo, al crear un documento usando --arg
, el valor siempre se trata como string:
--arg name value:
This option passes a value to the jq program as a predefined variable. If you run jq with –arg foo bar, then $foo is available in the program and has the value “bar”. Note that value will be treated as a string, so –arg foo 123 will bind $foo to “123”.