0

I have JSON name values that look like this

    {
  "key1": true,
  "key2": "1.9.2",
  "key3": "value3"
   }

how can I loop over it using bash and jq so the output will look like this:

export key1=true
export key2="1.9.2"
export key3="value3"
Gal Yakir
  • 135
  • 1
  • 10
  • The linked answers unfortunately do not cover the usage of `@sh` which [escapes](https://stedolan.github.io/jq/manual/#Formatstringsandescaping) the JSON content to be used for shell interpretation, which is an essential security precaution. – pmf Apr 06 '22 at 13:12
  • @pmf Feel free to add an answer to the linked duplicate, so that it can be shared as a reference for future – Inian Apr 06 '22 at 13:15
  • pmf - or see another post that references usage of `sh` ([this](https://stackoverflow.com/a/51482231/5291015) answer) – Inian Apr 06 '22 at 13:17
  • The linked answers help me – Gal Yakir Apr 06 '22 at 18:43

0 Answers0