Hi everyone good day,
how can I get the value of this object that is returning from this
Post.find().lean()
.exec((err, post) => {
console.log(post);
req.post = JSON.stringify(post);
console.log(req.post);
});
the first console log returns this
[ { photo: [ [Object] ] } ]
the second console log returns this
[{"photo":[{"_id":"5d7dd20185251921882e2ba1","data":"...","contentType":"image/jpeg"}]}]
now what i want to get is the contentType and data.
thank you.