Delays using multiple for loops
I think the main cause of your delays is not a nested for but rather a fact that you extract all data from your mongodb collection into memory. What you can do is


You can calculate formatted date once.
Then you can query just those users that contain given event date instead of populating all users in memory. Here's the guide


This will look roughly like the following

const dt = datetime.create();
dt.offsetInDays(0);
const formatted = dt.format('d/m/Y');

User.find({
        "events": {
            eventDate: formatted
        }       
    }).lean(true).exec((err, users) =&gt; {
        let getTEvent = [];
        //nested loops() //callbacks

        for (let i = 0 ; i &lt; users.length; i++) { 
          if(users[i].events &amp;&amp; users[i].events.length) {           
            for (let j = 0; j &lt; users[i].events.length; j++) {
                if(users[i].events[j].eventDate === formatted) {
                  getTEvent.push({events: users[i].events[j]});
                }  
            }
          }
        }


   return res.json(getTEvent)
});