title: How to take only the value from field of the database sql?
body: <p>I need to take only the value of field in the database. 
  First i take the number of rows that my database has with this line:</p>
  
  <pre><code>var num = await pool.query('SELECT count(*) FROM links WHERE user_id=?',[req.user.id]);
  </code></pre>
  
  <p>But the result is this: </p>
  
  <pre><code>[ RowDataPacket { 'count(*)': 2 } ]
  </code></pre>
  
  <p>I tried to do it like this:</p>
  
  <pre><code>var num = await pool.query('SELECT count(*) FROM links WHERE user_id=?',[req.user.id]);
  
  var num = JSON.stringify(num); 
  
  </code></pre>
  
  <p>But the result is this:</p>
  
  <p><code>[{"count(*)":2}]</code></p>
  
  <p>And I need to take only the number, in this case, the two.</p>