I have a jade template for my node.js project. I would like to send an object to the jade template and pass it to a function inside the page (to render something).
I
For this to work, you need to stringify on the server.
res.render(__dirname + '/pages/viz.jade', { vizJson: JSON.stringify(newJson), });
Then, as you mentioned, parse the JSON on the client.
script sunburst(JSON.parse(#{vizJson}))
Hope that helps!