I have something like this:
var sql = "SELECT EXISTS(SELECT * FROM files)";
var query = db.query(sql, function(err, result) {
console.log(result[0]);
});
console.log returns:
RowDataPacket { 'EXISTS(SELECT * FROM files)': 1 }
Looks like this is a key-value pair? how do i access the value in this case?
I did come across this: How to access a RowDataPacket object. but in my case since the property is a string I am not sure how to access it.