I have this.
app.get('/messages/all', async function (req, res) {
const messages = await collection.find({}).toArray();
res.send(messages)
And i do this.
curl -X GET http://localhost:3000/messages/all
And this return this.
[{"_id":"5e973b8669e20600a59cd2b2","from":"user","msg":"ville"},{"_id":"5e973b8669e20600a59cd2b3","from":"bot","msg":"Nous sommes à Paris"}]
But i don't want the id. So i want to remove the _id.
Can i have help (i am not english and 19 dont judge me pls)