{
"recordsets": [
[
{
"IdUsuario": 5152490,
"strNome": "Roberto ",
"IdPapel": 1
},
{
"IdUsuario": 5152490,
"strNome": "Roberto ",
"IdPapel": 3000001
}
]
]
I'm trying to return to the client only its permissions (IdPapel), however, I'm not getting it.
The code that performs the query follows and returns the resulting JSON:
function verify(query, res, user) {
sql.connect(dbConfig, (err) => {
if (err) {
console.log("Error while connecting database :- " + err);
res.sendStatus(403);
sql.close();
} else {
var request = new sql.Request();
request.query(query, (err, result) => {
if (err) {
console.log("Error while querying database :- " + err);
res.sendStatus(403);
sql.close();
} else {
res.send(result);
sql.close();
}
});
}
});
}
Any tips?
Thank you!