You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't figure out why this is not working. I can console out ReturnedArrayOfOBJIds, and newDoc but I can't push a new object to newDoc. Any help would be fantastic.
The text was updated successfully, but these errors were encountered:
So I'm using each and I can't .push a new item to the returned doc.
async.each(array, function(returnedDocs, callback) {
Model1.BuildDocIntoMongo(returnedDocs, function(err, newDoc) {
Model2.UseNewDocDataToAddToMongo(newDoc, function(err, ReturnedArrayOfOBJIds) {
newDoc.newList.push(ReturnedArrayOfOBJIds); //Returns an error "TypeError: Cannot call method 'push' of undefined"
})
})
})
I can't figure out why this is not working. I can console out ReturnedArrayOfOBJIds, and newDoc but I can't push a new object to newDoc. Any help would be fantastic.
The text was updated successfully, but these errors were encountered: