Reputation: 40522
https://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#~insertOneWriteOpResult
How do I attain the insertOneWriteOpResult
after performing an insertOne
operation?
var result =
yield users.insertOne({
lol: 'lol'
});
console.log(JSON.stringify(result));
I only seem to get the object {"ok":1,"n":1}
and not the list specified in the documentation.
Upvotes: 0
Views: 532
Reputation: 3751
Result object may contain values that cannot be stringified, any values that cannot be stringified are stripped from object when you try to print them to console.
Upvotes: 0