title: Insert data into MongoDb using mongoose
body: <p>I have an array of strings, I want to map through this array and update my collection with it's values.</p>
  <p>This is What I have tried:</p>
  <pre><code> if (employees) {
        employees.map((employee) =&gt; {
          Employee.updateOne({ $push: { name: employee.name } })
            .then((data) =&gt; {
              console.log(data);
            })
            .catch((e) =&gt; {
              console.log(e);
            });
        });
      }
  </code></pre>
  <p>At the top I am importing my model :</p>
  <pre><code>const Employee = require('../../models/employees');
  </code></pre>
  <p>My Model looks like this :</p>
  <pre><code>const mongoose = require('mongoose');
  const Schema = mongoose.Schema;
  
  const EmployeeSchema = new Schema({
    name: { type: String },
  });
  
  const Employee = mongoose.model('employee', EmployeeSchema);
  
  module.exports = Employee;
  </code></pre>
  <p>My console is logging the next :</p>
  <pre><code>{ n: 0, nModified: 0, ok: 1 }
  </code></pre>
  <p>But when i check the database the data is not there and no collection is created.</p>