Node.js: Creating multiple MongoDB docs over iterated JSON POST data
Not sure what newLink
is in your code, but you can try this instead:
newArticle.save(function (err, newDoc){ console.log(newDoc._id); // <--- !!!!!!!});
Not sure what newLink
is in your code, but you can try this instead:
newArticle.save(function (err, newDoc){ console.log(newDoc._id); // <--- !!!!!!!});