[Solved] NodeJS, MongoDB : Pass fetched data and display it on HTML
var questions = [ { number: ‘1’, text: ‘question_1’ }, { number: ‘2’, text: ‘question_2’ }, { number: ‘3’, text: ‘question_3’ }, ]; res.send(result, { questions: questions}); In the code above instead of initializing an empty array, I am assuming that I have a pre defined array of questions. In the res.send() part of the … Read more