1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  app.get('/project/:id/edit', function(req, res){
    User.find({ email:'[email protected]' }, function (err, subs){
      if(err)new Error('Could not get users');

      console.log(subs[0].first_name); // this works
      console.log(subs[0].email); // this doesn't work

      res.render('projects/edit', {
        layout: '../views/layouts/grid',
        title: 'Edit '+req.project.title,
        breadcrumb: BC_HOME + BC_SEP + 'Manage Project',
        project: req.project,
        subscribers: subs
      });  
    });
    
  });