On Jun 8, 2015, at 12:56 PM, JBD wrote:
> 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);;
Here, did you mean "i.OurRating" instead of "e.OurRating"?
Of course, you've got other typos, like the mismatched close parenthesis and the second trailing semicolon.