i'm doing some filtering on my json and saving it in a driver variable. I the driver variable is returning JSON data and i want to send them as they are to the view without changes.
my question is: how can i send the driver var to the view ?
router.get('/', function(req, res, next) {
rp(options)
.then(function (repos) {
var obj = repos;
var driver = _.filter( obj.features, ['id', 'tmp_location.20658']);
console.log(driver); })
.catch(function (err) {
// Delete failed...
});
res.render('index', { title: 'Express' });
});