V
V
Vadim Cherkashin2018-02-11 01:41:55
MongoDB
Vadim Cherkashin, 2018-02-11 01:41:55

How to compare MongoDB database data?

Hello everyone, I apologize for such a stupid question, but still...
For example, I have the following code:

mongoClient.connect("mongodb://localhost:27017/base", function(err, db){
 
  if(err) return console.log(err);
   
  db.collection("collection").find({param:'dfd',param_1:'fdfd'}).toArray(function(err, results){
    
      console.log( results);//Вывод того что в базе
      db.close('close');
  })

});

How can I compare the parameters received from the user, for example, with those that are in the database.
I just don’t know much about working with the database, and in general, I recently started learning the node.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-02-11
@dimonchik2013

comparison operator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question