I have this function:
app.get('/dashboard', async(req, res) => {
const customers = await stripe.customers.list();
customers.data.forEach(customer => {
console.log(customer.id);
});
// res.render('dashboard.ejs', {customer: customers})
})
what it does is returns all the customers from my Stripe db. However, now i want to pass the data returned from the loop, which is all of it lol, and access it on the front-end. How can i do this?