I am building a MEVN stack CRUD app (Vue, Node, Express, MongoDB). I am attempting to set up the following Express route for my app...

```
postRoutes.get('/view/:id', async (req, res) => {
  const collection = await loadPostsCollection();
  let id = req.params.id;
  res.send(await collection.find({}).toArray());
  res.status(201).send();
});

```

...so that it returns specific data from MongoDB based on the id of that data. I am not sure how to set up `res.send` so that it finds data based on `req.params.id`. I tried passing in `req.params.id` like so...

```
postRoutes.get('/edit/:id', async (req, res) => {
  const collection = await loadPostsCollection();
  let id = req.params.id;
  res.send(await collection.find({ _id: mongodb.ObjectId(req.params.id)}).toArray());
  res.status(201).send();
});

```

...but that also did not work. Any idea how to set up this route so that it finds data based on the ID parameter? Thanks!

My full Express router page is below:

```
const express = require('express');
const postRoutes = express.Router();
const mongodb = require('mongodb')

postRoutes.get('/', async (req, res) => {
  const collection = await loadPostsCollection();
  res.send(await collection.find({}).toArray());
});

postRoutes.post('/add', async (req, res) => {
  const collection = await loadPostsCollection();
  let task = req.body;
  await collection.insertOne(task);
  res.status(201).send();
});

postRoutes.get('/view/:id', async (req, res) => {
  const collection = await loadPostsCollection();
  let id = req.params.id;
  res.send(await collection.find({}).toArray());
  res.status(201).send();
});

postRoutes.delete('/delete/:id', async (req, res, next) => {
  const collection = await loadPostsCollection();
  collection.deleteOne({ _id: mongodb.ObjectId(req.params.id) });
  res.status(200).send({});
});

async function loadPostsCollection() {
  const client = await mongodb.MongoClient.connect(
    '...',
    {
      useNewUrlParser: true
    }
  );
  return client.db("test").collection("todos")
}

module.exports = postRoutes;

```