title: Coffeescript / Zappajs how to pass array to be rendered
body: <p>This is a zappajs/coffeescript newbie question, I try to write a script that collects from mysql and renders results with div, not tables, works so far with just one row. My question how do I pass on the whole result array for output with the template? Code example below, any criticism welcome, thanks:</p>
  
  <pre><code>@post '/', (req, res) -&gt;    #POST FOR SHOWSTOCK
    MysqlConnection = mysql.createConnection(
      ...
    )
    MysqlConnection.connect()
    .... 
      else
        sql = "select art.artcode,art.artname, art.artsonst, groessen.colcode,groessen.artgrb,groessen.artwidth,groessen.artist,date_format(artoffdate,'%d-%m-%y') as mydate, groessen.soreason from groessen,art where groessen.artcode = art.artcode and  art.artcode = " + MysqlConnection.escape(req.body.art.artcode)
        MysqlConnection.query sql, (err, rows) -&gt;
          throw err if err
          ... 
          exports.art = rows
          ...
    MysqlConnection.end
    @redirect '/showstock'  # 'back' or 'home'= "/"
  
  
  
  @get '/': -&gt;     
    @render index: {
       }
  
  
  @view index: -&gt;    
    h1 img src: '/BW_AL_Logo_Blue.jpg', align:'left', alt:'Logo' , width:240, height:120, top:25, left:370 ,position:'absolute'
    h2 style: "font-family:sans-serif;;position: absolute; top: 10px; width: 250px; left: 350px; height: 25px; background-color: white", 'XYZ Stock Information'
    form method: "post", action: "/", -&gt;
      div "#Artcode", style: "position: absolute; top:60px; left:680px; width: 121px; height: 21px;", -&gt;
        input type: "text", name:"art[artcode]"
      div "#Submit", style: "position: absolute; top:60px; left: 840px; width: 121px; height: 21px;", -&gt;
        input type: "submit", value: "Submit"
  
  
  @get '/showstock': -&gt;    
    @render showstock: {
       artname0: exports.art[0].artname
       ... 
       }
  
  
  @view showstock: -&gt;    
    h1 img src: '/BW_AL_Logo_Blue.jpg', align:'left', alt:'Logo' , width:240, height:120, top:25, left:370 ,position:'absolute'
    ...
    div style: "position: absolute; left: 10px; top: 195px; height: 400px; width:1200px; padding: 2px; border:2px solid gray;",-&gt;
      div "#colcode", style: "height: 3px;width:90px;float:left;",-&gt;
        b "COLOUR"
        br()
        @colcode0
      div ...  
  </code></pre>