title: Get cypress database query output objects in to variables
body: <p>I have a cypress test which has been set up with mysql node module. When I run bellow mentioned test Its giving output as follows.</p>
  <pre><code>const executeQuery = (query) =&gt; {
      cy.task('DBQuery', query).then(function (recordset) {
          var rec = recordset
          cy.log(rec)
      })
  }
  </code></pre>
  <p>Query:</p>
  <pre><code>select * 
  from Users 
  where email = 'sheeranlymited@lymitedtest.com'
  </code></pre>
  <p>OUTPUT: log [Object{23}]</p>
  <p>Query:</p>
  <pre><code>select firstname 
  from Users 
  where email = 'sheeranlymited@lymitedtest.com'
  </code></pre>
  <p>OUTPUT: log [{firstname: Edward}]</p>
  <p>instead of <code>cy.log(rec)</code> I want to get the output of 23 columns to assign in to different variables based on the column name.</p>
  <p><a href="https://i.stack.imgur.com/AaQuV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AaQuV.png" alt="enter image description here" /></a></p>
  <p>Appreciate if someone can help me to resolve this...</p>