Q:

Can I render multiple sources in EJS

I am attempting to use data from 2 different sources, but render them on the same HTML page using EJS, JS and node.
This is what I am trying..
app.set('view engine', 'ejs');
app.get('/', function(req, res) {
  res.render('index.ejs', { data: JSONdata })
  res.render('index.ejs', {data2: arrayData})
});

data is a JSON, data2 is an array. I have attempted to look up proper syntax for this exact process but cant seem to find anything.
Many thanks.

A:

You cannot render more than once to a single request. 
But you could simply combine your JSON and array data and stringify it.
App.set('view engine', 'ejs');
app.get('/', function(req, res) {
  res.render('index.ejs', JSON.stringify({data2: arrayData, data1: JSONdata}))
});

Or simply assign both variables into a single object and parse it to the render function
var returnVals= JSON.stringify({data2: arrayData, data1: jsonData}); 

