A
A
Alexander Ivanov2019-04-22 13:09:59
Mongoose
Alexander Ivanov, 2019-04-22 13:09:59

How to use methods from base?

I make a request to mongo, I use the construction

var cursor = regions.find({}).cursor();     
                         cursor.on('data', function(doc) {
                            console.log(doc['methods']);
                          });
                      return res.render('index', { q: '' });                                      }

Moreover, if you use instead of doc['methods'] -> doc['_id'] or doc['regionName'], the correct values ​​are displayed from the database, but when I access methods, it 5cbd92e165915513862315.pngdisplays undifine. but they are also in the database. Most likely, I'm not addressing them correctly, but I just can't find the correct appeal in the documentation.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question