Skip to content

Instantly share code, notes, and snippets.

@piercemoore
Last active December 17, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piercemoore/5620917 to your computer and use it in GitHub Desktop.
Save piercemoore/5620917 to your computer and use it in GitHub Desktop.
db.Page.insert({
name : 'page-X',
title : 'Title Here',
sections : [
{
name : 'hero-1',
content : 'all content here blah blah'
},
{
name : 'hero-2,
content : 'moiasifohasfihafola'
}
]
}, function(err, page) {
if(err)
throw err
else
doSomething(page)
});
for(var x in pageData.sections) {
pageData.sections[x] = x;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment