Update all model Express.js
<p>I want to update all my model using a put request on express.
For example I have a collection in mongoDB like this</p>

<pre><code>{
    '_id': '123'
    'name' : 'jonh',
    'last' : 'smith',
    'email': 'js@dom.com',
    'phone': 'HTC',
    ...[more data]
}
</code></pre>

<p>Using a put request I send new data (not necessary all fields existing)
<a href="https://i.stack.imgur.com/Akr8f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Akr8f.png" alt="enter image description here"></a>
In my index.js I tried with:</p>

<pre><code>router.put('/update/:id', function(req,res){
  Perfiles.findByIdAndUpdate(req.params.id,req, function(err){
    if(err) { res.send(err);}
    res.json({messaje:'Done'});
  });
});
</code></pre>

<p>But my collection still without changes. I want to update even if the other fields are deleted</p>

<pre><code>{
    '_id': '123'
    'name' : 'Carl',
    'phone': 'iPhone'
}
</code></pre>