When i connect with mysql ,i get this value { id: 14 } actually i wanna get only 14 this is my code
app.get('/register',function(req,res){
var data = {
"error":1,
"result":""
};
console.log("ams");
connection.query("SELECT id from register",function(err, rows, fields){
if(rows.length != 0){
data["error"] = 0;
data["result"] = rows;
res.json(data);
console.log(data.result[0]);
}else{
data["result"] = 'No data Found..';
res.json(data);
}
});
});