Hi.
I am trying to loop through an array and change the value of a field in a
node.js controller. How do I do this?
item.fetch({
onerror: function() {
res.status(404).end();
},
success: function() {
var e = item.toJSON();
for (var i in e) {
e.OurRating = e.OurRating*10).toFixed(0);;
}
viewData.Item = e;
render(req, res, 'page', viewData);
}
});
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/134a0acb-17ef-4d80-b7aa-9251b6928e9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.