Passing an array to a JSON object for Jade rendering
问题 I have a node.js server written in express and at a certain moment I send to some .jade page an array. The problem is that when rendering the Jade page, the Jade compiler renders the array as [object Object] and the JavaScript compiler on Chrome complains about it saying "Unexpected identifier". This is the Jade code: !!! 5 html(lang="en") head title= "Rankings" body h1 Ranking div(id="rankings") script(type='text/javascript') function fillRanking(){ var rankArray = #{ranking}; alert("inside