title: Loop through JSON file and set each value as a variable within Github Actions workflow
body: <p><strong>Goal</strong>: set ~20 variables that are stored in a JSON file into the $GITHUBENV during GHA job.</p>
  <p>Currently, I am hardcoding this with the parsing of the JSON file with jq:</p>
  <pre><code>- name: Set env variables from variables json
        run: |
            echo &quot;NAME=$(jq -r '.name' variables.json)&quot; &gt;&gt; $GITHUB_ENV
            echo &quot;AGE=$(jq -r '.age' variables.json)&quot; &gt;&gt; $GITHUB_ENV
            echo &quot;WEIGHT=$(jq -r '.weight' variables.json)&quot; &gt;&gt; $GITHUB_ENV
            ...etc
  </code></pre>
  <p><strong>How can I &quot;for loop&quot; through this process?</strong></p>
  <p>Afterwards, I want to check if the variables entered manually through a workflow_dispatch run of the job match what are in the variables.json file. If they don't match, I want to update the json file with the new manually entered value:</p>
  <pre><code>- name: Set age if dispatching
        shell: bash -l {0}
        if: github.event.inputs.age != env.AGE
        run: echo &quot;$( jq '.name = ${{github.event.inputs.age}}' variables.json )&quot; &gt; variables.json
  </code></pre>
  <p><strong>Similarly, how do I loop through this process?</strong></p>