I did an API connection to get a query result (arrays of arrays). But Im not able to save the result into another variable and use it with some other function I have created. I get a answer of Promise {<Pending>}
Here is the example of the code that works fine when using console.log, and not associated to a variable
client.query('SELECT * FROM "INDIGO MONITORING" LIMIT 2;').then(result => console.log(result.rows)).catch(error => console.log(error));
Result example: good Result when testing with console.log
in .then
Here is my attempt to save the result and getting back Promise {<pending>}
let results = client.query('SELECT * FROM "INDIGO MONITORING" LIMIT 2;').then(result => {return result}).catch(error => console.log(error));