title: How to access RowDataPacket mysql-node.js
body: <pre><code>connection.query('
  SET @update_id := 0; 
  UPDATE relations set x1 = ?, y1 = ?, id = (SELECT @update_id := id) WHERE element_to =?;
  SELECT @update_id;',[data.x2,data.y2,id],function(err,result){
  if(err){console.error(err);}
  else{console.log(result);console.log(result.@update_id);}
  });
  </code></pre>
  
  <p>I am getting the following result from a query execution:</p>
  
  <pre><code>[ RowDataPacket {
    '@update_id': 'WAbWA1WA5WA2WA8WAdWA4WA9' } ] ]
  </code></pre>
  
  <p>How do I access the <strong>@update_id</strong> field to store the value in a variable. I know these are objects and I tried the following to access them such as follows: </p>
  
  <pre><code>results.@update_id; 
  </code></pre>
  
  <p>But I get undefined when I try to log the value. How to get the value? </p>