DEV Community

Rishav Raj
Rishav Raj

Posted on

How to wait for a function to finish with all its inside expressions, in router in mongoose?

I just want to change the value of a key of all the objects inside an array

What I want actually -

The object which I queried from the database is -

  _id: 61389277fa5c742caf959885
  title: 'What is GRE?',
  forumTab: 'GRE',
  askedAt: 2021-09-08T10:37:43.979Z,
  askedBy: {
    _id: 60f0a6a9b4259f7ef9c49cc8,


Top comments (0)