I'm using Deno Oak + pgsql db and i want to extract this table from PostgreSQL :

enter image description here

and put it as an array into js variable, how can i do that ?

Here is the function i used :

const recapPanier = async(ctx:any)=>{

    const getPanierData = await client.queryArray`SELECT * FROM panierencours;`;

    ctx.render('./OBV/panier/panier.ejs',{data: getPanierData});

  await client.end();


as you can see, it should render a page with the data variable but instead to have the data i have this : [object Object]. notice that I'm using EJS to render front-end content.

New contributor
Fefe is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.


Your Answer

Fefe is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.