I have been trying to create a JSON file using jq
. For single argument, it works good
bash$ jq -n --arg capital delhi --arg noofstates 29 '{"india":"\($capital)","states":"\($noofstates)"}'
{
"states": "29",
"india": "delhi"
}
Now, I need to expand this json with array via jq. For e.x
"statelanguage": [{
"Tamilnadu": "Tamil",
"Statenumber": "22"
},
{
"Andra": "Telugu",
"Statenumber: "8"
}
],
I am not able to figure out how to do this via jq
Comments
Post a Comment