title: using jq to assign multiple output variables
body: <p>I am trying to use <code>jq</code> to parse information from the <a href="https://api.thetvdb.com/swagger" rel="noreferrer">TVDB api</a>. I need to pull a couple of fields and assign the values to variables that I can continue to use in my <code>bash</code> script. I know I can easily assign the output to one variable through bash with <code>variable="$(command)"</code> but I need the output to produce multiple variables and I don't want to make to use multiple commands.</p>
  
  <p>I read this documentation:</p>
  
  <p><a href="https://stedolan.github.io/jq/manual/v1.5/#Advancedfeatures" rel="noreferrer">https://stedolan.github.io/jq/manual/v1.5/#Advancedfeatures</a></p>
  
  <p>but I don't know if this relevant to what I am trying to do.</p>
  
  <p><code>jq '.data'</code> produces the following output:</p>
  
  <pre><code>[
    {
      "absoluteNumber": 51,
      "airedEpisodeNumber": 6,
      "airedSeason": 4,
      "airedSeasonID": 680431,
      "dvdEpisodeNumber": 6,
      "dvdSeason": 4,
      "episodeName": "We Will Rise",
      "firstAired": "2017-03-15",
      "id": 5939660,
      "language": {
        "episodeName": "en",
        "overview": "en"
      },
      "lastUpdated": 1490769062,
      "overview": "Clarke and Roan must work together in hostile territory in order to deliver an invaluable asset to Abby and her team."
    }
  ]
  </code></pre>
  
  <p>I tried <code>jq '.data | {episodeName:$name}'</code> and <code>jq '.data | .episodeName as $name'</code> just to try and get one working. I don't understand the documentation or even if it's what I'm looking for. Is there a way to do what I am trying to do?</p>