I have a script where I am storing variables and using that I am trying to create a json output to a file. here is my json build format
#!/bin/bash
JSON_STRING=$(jq -n \
--arg configId "$configid" \
--arg objectname "tempfile" \
--arg artifacts "[{ "name" : "oer", "version" : "$ot" }]" \
--arg test "2021" \
'$ARGS.named') > output.json
desired json o/p (output.json) -
{ "configId": "c8f", "objectname": "tempfile", "artifacts": [{ "name" : "oer", "version" : "1.01" }], "test" : "2021"}
here I am not getting the desired output. any help would be great
jqexperts.