How to Handle the Return Value of query Function in node-mysql

  node.js, question

For example, a query from the database returns the following:

clipboard.png

connection.query(count, function(err, results){
 console.log(results);
 });

How should I get the value of 7157?

—-update—–
I looked up the number of records in the table:select count(*) from tablename
Perhaps because of this, the returned object uses count(*) as the attribute name.

Results arrayThe firstzeroOf objectscount(*)The property is 7157

so

results[0]['count(*)']