The logic is pretty confusing, so I have to make sure of this first. Here are a few things you probably missed. count += as already mentioned. There is no callback inside your iterator, and you also double clicked the family inside extendedFamily.kids.
count += item.descendants.length; console.log('outercount ' + count); async.eachSeries(item.descendants, function(item, cb) { count--; console.log('item: ' + item); exports.buildFamily(item, function(err, family){ console.log('deepcount: ' + count); if(count===0){ return mback(null, extendedFamily);} else { extendedFamily.kids.push(family); cb(); } }) })
Rahat mahbub
source share