NodeJS MSSQL .query returning double data in both recordsets and recordset

The data is not retuned twice but just exposed through two properties. The recordset property just exposes the first recordset in recordsets.

mssql documentation:

result.recordsets.length // count of recordsets returned by the procedure
result.recordsets[0].length // count of rows contained in first recordset
result.recordset // first recordset from result.recordsets

You can get the columns data with queries like:

result.recordset[0].student_firstname  // returns the value of the student firstname of first row
result.recordset[0].student_lastname   // returns the value of the student lastname of first row