title: Adding an array inside my Mongoose schema
body: <p>I have the following schema where I am trying to add an array of comments to my blog post schema, then inside the comments schema I need to add an array of pictures urls related to each specific comment. I've researched the web and found this link <a href="http://mongoosejs.com/docs/2.7.x/docs/embedded-documents.html" rel="nofollow">embedded documents</a> to mongoose documentation, yet noticed that it is related to mongoose version 2.7 while we are currently at version 3.8. So was wondering if I am doing it right?, and if not can someone please help me by suggesting the best way for designing my blog post schema so that it includes the blog post array of comments as well as the array of pictures related to each comment. Thanks for your time and effort.</p>
  
  <pre><code>var mongoose = require('mongoose');
  var Schema = mongoose.Schema;
  
  var pictures = new Schema({
      picURL: String,
      date: {
          type: Date,
          default: Date.now
      }
  });
  
  var comments = new Schema({
      subject: String,
      body: String,
      date: {
          type: Date,
          default: Date.now
      },
      pictures:[pictures]
  });
  
  var blogpost = new Schema({
      title: String,
      body: String,
      date: {
          type: Date,
          default: Date.now
      },
      comments:[comments]
  });
  
  module.exports = mongoose.model('BlogPost', blogpost);
  </code></pre>