accessing passed data on front end

I have this on the node.js backend:

var getschedule = "select * from SCHEDULE"
console.log(getschedule);
ibmdb.open(ibmdbconn, function(err, conn) {
    if (err) return console.log(err);
    conn.query(getschedule, function(err, rows) {
        if (err) {
            console.log(err);
        }

        console.log(rows)
        
        res.render("calendar.ejs", {data: rows, trainerFirstName: req.session.firstname, trainerLastName: req.session.lastname});

        conn.close(function() {
        });
    });
});

and as you can see I am passing data: rows. Now in my <script> on the front end, i want to access all the data inside data, which i am passing. how can i do this?