I use Angular on the frontend and send a post request to a backend built with Express. 

This is how the Angular code looks: 

```
  addEntry() {
    let type = "Random Type";
    let location = "Random Location";
    let date = new Date();
    let results = [
      { name: "my first name", age: 23 },
      { name: "new second name", age: 35 },
    ];

    return this.http.post<{ message: string }>(
      this._url + "/myendpoint/add",
      { type, location, date, results }
    );
  }

```

And this is how the express code looks like: 

```
router.post(
  "/add",
  middleware.verifyToken,
  async function (req, res) {
    const errors = validationResult(req);
    if (!errors.isEmpty()) {
      return res.status(422).json(errors.array());
    }

    try {
      let userID = req.tokenData.userID;
      let user = await User.findOne({ _id: userID });
      if (user === null || user.length <= 0) {
        return res.status(422).json("Could not add entry");
      } else {
        let type = req.body.type;
        let location = req.body.location;
        let date = req.body.date;

        console.log(req.body);

        let results = req.body.results.map(async (el) => {
          let result = await Entry.findOne({ name: el.name });
          return {
            name: result.name,
            age: el.age,
          };
        });

        [some more code ...]

      }
    } catch (err) {
      console.log(err);
      return res.status(422).json(err);
    }
  }
);

```

The console log outputs: 

```
{
  type: 'Random Type',
  centre: 'Random Location',
  date: '2020-06-19T16:50:25.357Z',
  results: '[object Object]'
}

```

And I also receive this error which is probably generated because the results show as '[object Object]';

```
TypeError: req.body.results.map is not a function

```

How do I get the results array in Express instead of '[object Object]'? I have the following settings enabled in Express:

```
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());

```