Question: I am trying to send an array of objects to jade, to get it rendered. I am not able to render it using Jade.
In node.js I query a database and I retrieve several documents out of the database and I put these documents (JSON) into an array of objects (dataarray).

```
dataarray = [];
dataarray[i] = dbdocument;

```

I would like to pass the dataarray to Jade in the node.js get method

```
res.render('index', {
    title: 'Image Analysis - this is the content of the database',
    dbdoc: dataarray
});

```

In Jade I tried several coding stuff without any success.
What I am going to do is to render the dataarray as a table in Jade
like this
.....

```
tbody        
   tr
     td= 1
     td= dataarray.ImageID

```

any recommendation how to render the dataarray in Jade as a table?

Answer: 
To display an array in jade, you have to use loop:

```
tbody
   each val in dbdoc
    td= 1
    td= val.ImageID

```
Perfect, thanks a lot - it is working!
In node.js I am passing the object
 res.render('index', {
 title: 'Image Analysis - this is the content of the database',
 dbdoc: dataarray
 });

In Jade am using in this way
....
- dataarray = typeof(dbdoc) != 'undefined' ? dbdoc : { }
....
 tbody  

 each val in dbdoc
 tr
 td= 1
 td= val.ImageID

which displays a table and in each row there is one database record (val.ImageID .....)