I've got a plain handlebars template that I'm passing through puppeteer to generate a pdf. I'm able to access the data through the body normally but can't seem to do so in a JS script tag. My data looks something like this.
const context = { data: [ {..some data}, {...some data}, {...some data}] }
I'm trying to access it in my script tag like
const data = "{{ data }}"
but all I get back when I console log this in my script tag is
[object Object],[object Object],[object Object]
When I check the typeof, it comes back as a string.