title: How to update value of a key in a list of a json in Mongo
body: <p>I have a document---</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>   Employees:[
         {
            name:"abc",
            contact:"123",
            email:"xyz@gmail.com"
         },
         {
            name:"efg",
            contact:"456",
            email:"efg@gmail.com"
         },
         {
            name:"hij",
            contact:"789",
            email:"hij@gmail.com"
         }
    ]
  </code></pre>
  
  <p>I need to update name with value= "abc" for all the keys name in the list.</p>
  
  <p>I have tried to update like</p>
  
  <pre class="lang-js prettyprint-override"><code>db.collection.update(
      { "_id" : ObjectId("5308595e3256e758757b4d2f") }, 
      { "$set": { "Employees.name " : "abc" } } 
  );
  </code></pre>
  
  <p>But getting the error:  cannot use the part (Employees of Employees.name) to traverse the element.</p>