'How to suppress column headers from query output

When i run the query it outputs the column names(headers) along with the results which is a problem since i need a result only output. I've seen the mysql -N -e option that may fix the problem, is there a way to implement -N -e into my connection?

const mysql = require("mysql2");
const connection = mysql.createConnection({
host: "localhost",
database: "mydb",
user: "root",
password: "password1"
});

connection.query(
"SELECT iso2,cases FROM mydb WHERE dates='" + pickedDate + "';",
function (err, results, fields) {
const filePath = path.join(__dirname, "data", "pickedDate.json");
const fileData = fs.readFileSync(filePath);
const storedDates = JSON.parse(fileData);
storedDates.push(results);
fs.writeFileSync(filePath, JSON.stringify(storedDates));
});


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source