title: How Do I Get Values From This Array From My Database Without the Column Name?
body: <p>I am trying to connect my database to my web app and I can get the data to show up how I want it to. I am getting too much information.</p>
  <p>The code I have tried is this:</p>
  <pre><code>var express = require(&quot;express&quot;);
  
  var router = express.Router();
  
  const mysql = require('mysql')
  const connection = mysql.createConnection({
    host: '',
    user: '',
    password: '',
    database: ''
  })
  
  connection.connect()
  
  
  router.get(&quot;/&quot;, function(req, res, next) {
      connection.query ('SELECT countnum FROM countrecord', 
      function (err, rows){
          if (err) console.log(err)
  
          var string = JSON.stringify(rows)
          res.send(JSON.parse(string)
      }
      ); 
      
  });
  
  module.exports = router;
  </code></pre>
  <p>Though I do have the database information in the create connection.</p>
  <p>When I send the data to the webapp and API, I get this:</p>
  <pre class="lang-json prettyprint-override"><code>[{&quot;countnum&quot;:1},{&quot;countnum&quot;:5},{&quot;countnum&quot;:6},{&quot;countnum&quot;:7},
  {&quot;countnum&quot;:15},{&quot;countnum&quot;:15},{&quot;countnum&quot;:15},{&quot;countnum&quot;:15},
  {&quot;countnum&quot;:15},{&quot;countnum&quot;:15},{&quot;countnum&quot;:15},{&quot;countnum&quot;:15},
  {&quot;countnum&quot;:15},{&quot;countnum&quot;:15},{&quot;countnum&quot;:15},{&quot;countnum&quot;:15},
  {&quot;countnum&quot;:15},{&quot;countnum&quot;:15},{&quot;countnum&quot;:8},{&quot;countnum&quot;:20},
  {&quot;countnum&quot;:8},{&quot;countnum&quot;:166},{&quot;countnum&quot;:155},{&quot;countnum&quot;:155}]
  </code></pre>
  <p>But I only want the numbers so I can iterate through them and work with them. I have tried so many other things and either I get errors or I get undefined, so I don't get anything showing up. Help with this would be greatly appreciated as I am very lost.</p>