How to get a value from an array? this array is created when calling a SQL query
const task2 = "SELECT avg(age) FROM person"
conn.query(task2, (err, result) =>{
console.log(result)
})
[ RowDataPacket { 'avg(age)': 38.4444 } ]
Via Active questions tagged javascript - Stack Overflow https://ift.tt/Q2rpeIL
Comments
Post a Comment