I am using mongodb in a react app and the following query

```
  let editedTime =  await req.db.collection('commentsPosts').findOne( 
    {
      "_id": req.query.whenEditedId
    }
  )
  res.json({editedTime});

```

gives me the following result

```
{"editedTime":{"_id":"abcd","text":"this was edited","editedAt":"2020-08-09T23:37:31.279Z"}}

```

How to find if editedAt was within last 10 mins OR is there something to get the date difference?