title: How to write find and update query in express.js?
body: <p>I am using REST API(express.js and mongodb) and trying to update my document but it's not working. I don't know what is the error but can someone help me out to move forward? I have added my route and controller </p>
  
  <p><strong>Routes</strong>:</p>
  
  <pre><code>app.route('/articleupdation')
           .post(article.updatearticle);
  </code></pre>
  
  <p><strong>Controller</strong>:</p>
  
  <pre><code>exports.updatearticle = function(req, res) {
  
      Article.findOne({
                      Username: 'xx',
                      Email: 'xx@gmail.com',
                      Info: 'Deactivate',
  
                  }, function(err, article) {
  
                      if (!err &amp;&amp; article) {
  
                              article.Info = 'Active';
  
                              article.save(function(err) {
  
                                  if (err) {
  
                                      console.log('not working');
                                  } else {
                                      console.log('working');
                                  }
                              });
  
                      } else {
                          console.log('Condtion not matched ');
                          console.log(err);
                      }
                  });       
      };
  </code></pre>
  
  <p>Data stored like this </p>
  
  <pre><code>{
      "_id": {
          "$oid": "5799995943d643600fabd6b7"
      },
      "Username": "xx",
      "Email": "xx@gmail.com",
      "Info": "Deactivate",
      "Description": "aajdjdjddjdkjddjdjdhdj",
  
  }
  </code></pre>
  
  <p>Here is what I am trying to achieve; if <code>Username, Email, Info</code> are matched I need to update <code>article.Info = 'Active';</code> but this is not working, can someone help me out please?</p>