I m using the node,express,mysql2 packages .When i m using console.log(rows) ,it is giving me following output:
[{\"userid\": \"test\",\"password\": \"test\"}] <
connection.query('SELECT * from pass', function(err, rows) { data = rows[0]; let user = data.userid; let password= data.password; res.json(rows); });