title: mongoose | update all documents according to a field in each document
body: <p>i have a collection which i would like to update all of it's documents according to field <code>email</code> and convert it to lower case.</p>
  
  <pre><code>const addressBookSchema = new Schema({
      email: String,
  });
  const addressBook = mongoose.model("address_book", addressBookSchema)
  </code></pre>
  
  <p>i'm trying to do the following:</p>
  
  <pre><code>addressBook.update({}, {$set: {email: email.toLowerCase()}}, {multi: true});
  </code></pre>
  
  <p>But that doesn't work.</p>
  
  <p>how do i get the email field and set it to lowercase?</p>