I have a mongoose object schema that looks similar to the following:
var postSchema = new Schema({
imagePost: {
images: [{
url: String,
You're missing the imagePost object of your schema in your new object. Try this instead:
var new_post = new Post();
new_post.imagePost = { 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.imagePost.images.push(imageObj);
}
new_post.save();