title: Saving an array property on a Mongoose schema
body: <p>I have a mongoose object schema that looks similar to the following:</p>
  
  <pre><code>var postSchema = new Schema({
     imagePost: {
       images: [{
          url: String,
          text: String
       }]
   });
  </code></pre>
  
  <p>I'm trying to create a new post using the following:</p>
  
  <pre><code>var new_post = new Post();
  new_post.images = [];
  for (var i in req.body.post_content.images) {
    var image = req.body.post_content.images[i];
    var imageObj = { url: image['url'], text: image['text'] };
    new_post.images.push(imageObj);
  }
  new_post.save();
  </code></pre>
  
  <p>However, once I save the post, it's created with an empty array for the images property. What am I doing wrong?</p>