Help for MEAN project

Can anyone help me with my project it’s based on MEAN stack and i have some difficulty in mongodb.Actually i want to use one of the field in my document as a variable in a loop in nodejs i am not able find it anywhere can anyone help me with it please it would be great help.

2 Likes

Hello @Jatin_Kadam, welcome to the community!

It would be helpful for others to read and respond to your question if you could describe your issue in more detail and elaborate on your doubts. With more information we can try to find an answer.

Cheers
Michael

1 Like

Yes sure,So i have a field in my documents which has number so i want to use that as my variable in for loop in nodejs to get results accordingly.

Hi! If sounds like what you are asking is:

Let’s say you have field in your collection called maxCount. And you want a for loop something like this:

for (let step = 0; step < maxCount; step++) {
 // do something here
}

Is that what you mean? If not, can you provide an example so we can best tailor the answer to your need? Thanx!