title: How to Create and Use Enum in Mongoose
body: <p>I am trying to create and use an <code>enum</code> type in Mongoose. I checked it out, but I'm not getting the proper result. I'm using <code>enum</code> in my program as follows:</p>
  <p>My schema is:</p>
  <pre><code>var RequirementSchema = new mongooseSchema({
     status: {
          type: String,
          enum : ['NEW','STATUS'],
          default: 'NEW'
      },
  })
  </code></pre>
  <p>But I am little bit confused here, how can I put the value of an <code>enum</code> like in <code>Java NEW(&quot;new&quot;)</code>. How can I save an <code>enum</code> in to the database according to it's enumerable values. I am using it in express node.js.</p>
  <p>Thanks</p>