Last active
April 30, 2018 17:52
-
-
Save joesavak/f388e8bbe2dc8f771cd6f740219066a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoanModel.find({},{},{limit: 4, sort:{timestamp:-1}}).exec(function(error, loans) { | |
if(error){throw error;} | |
for (var i = 0; i<loans.length; i++) { | |
viewModel.loans[i]=loans[i].toObject(); | |
} | |
res.render('index',viewModel); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment