title: How to update names field nested in an array in mongodb
body: <p>I have this object and I'd like to update the name field "field" of all the document in the collections. I read the mongodb documentation and it says <code>$rename</code> doesn't work in this case. I should execute a forEach but I don't know how which command use</p>
  
  <pre><code>{
    "name": "foo"
    "array": [
     "object": {
       "field": "name"
     }
     ]
  }
  </code></pre>