title: Using updateMany() in updating multiple documents
body: <p>I have trouble in updating all my documents in MongoDB. Update is the easiest I could do but I still wanted options on how to update them all without using update all over again. as you can see in the picture only one document is modified not all of them. should I use <code>foreach</code>? and If yes, how to do it?
  I apologize in advance since I'm only a beginner, still learning the ropes of MongoDB.</p>
  <p><a href="https://i.stack.imgur.com/06yyO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/06yyO.png" alt="enter image description here" /></a></p>
  <p>Here is my code:</p>
  <pre><code>db.employees.updateMany(`
  
  {id: 1},{$push: {&quot;contact&quot;: {&quot;email&quot;: &quot;steve.badiola.gov.ph&quot;, &quot;phone&quot;: &quot;+1 1234567&quot;}}},
  
  {id: 2},{$push: {&quot;contact&quot;: {&quot;email&quot;: &quot;jamir.garcia.gov.ph&quot;, &quot;phone&quot;: &quot;+2 1234567&quot;}}},
  
  {id: 3},{$push: {&quot;contact&quot;: {&quot;email&quot;: &quot;reg.rubio.gov.ph&quot;, &quot;phone&quot;: &quot;+3 1234567&quot;}}},
  
  {id: 4},{$push: {&quot;contact&quot;: {&quot;email&quot;: &quot;ian.tayao.gov.ph&quot;, &quot;phone&quot;: &quot;+4 1234567&quot;}}})
  </code></pre>