I'm a beginner in node.js
So, I used this to
var toFix = {
'renault': 'Renault',
'renault ': 'Renault',
'RENAULT ': 'Renault',
'RENAULT': 'Renault',
};
async.forEachOfSeries(toFix, function(to, from, cb){
Car.update({make:from }, {$set: {make: to}}, {multi: true},cb)
}, done);
and it worked for my table car.
but when I want to use the same code in an other table, where car is an object in a table, It doesn't work, for exemple:
async.forEachOfSeries(toFix, function(to, from, cb){
Ticket.update({car.make:from }, {$set: {car.make: to}}, {multi: true},cb)
}, done);
it can't accept car.make . so how should I access to my object?
Thanks