My problem is that i've got 1 array with multiple objects. And i need to do stuff for all those single objects in that array. Async
But it doesn't work?
Code:
console.log('Data: ' + data);
async.eachSeries(data, function (item, callback3) {
console.log(item.id);
callback3('0');
}, function done(err) {
console.log('done');
});
And this is what the server loggs:
[root@bravo servers]# node app.js
[ { id: 1,
ownerid: 11,
topicid: 1,
content: 'First comment',
date: Sun Jun 21 2015 23:18:05 GMT+0200 (CEST) },
{ id: 2,
ownerid: 11,
topicid: 1,
content: 'Another test',
date: Mon Jun 22 2015 00:18:34 GMT+0200 (CEST) } ]
1
done
As you can see it's not doing the second one its right going to the done function?