title: Array of subdocuments in Mongoose
body: <p>I have two schemas.    </p>
  
  <pre><code>FAQ Schema 
  
  const EventFAQSchema = mongoose.Schema({
      question: { type: String, req: true },
      answer: { type: String, req: true }
  });
  
  EventSchema 
  
  const EventSchema = mongoose.Schema({
     "title": { type: String },
     "description": { type: String },
     "eventFAQs": [{
         type: EventFAQSchema ,
         default: EventFAQSchema 
      }]
  })
  </code></pre>
  
  <p>I am trying to embed an array of objects of type FAQ. But I get the following error</p>
  
  <p><code>Undefined type 'undefined' at array 'eventFAQs'</code></p>
  
  <p>I know I am missing a fundamental concept of array of objects. But I have spent a good deal of time trying to find out the reason and couldn't resolve it myself.</p>