title: Inserting nested data in mongodb
body: <p>I am making a simple backend for my shopping cart application and the data is nested.</p>
  
  <p>This are some of the fields of the collection</p>
  
  <pre><code>db.now.insert( { name: "admin", status: "online"})
  </code></pre>
  
  <p>and this here is the nested data </p>
  
  <pre><code>    "catalog" : [
              {
                  "objectid" : 1,
                  "message" : "sold",
                  "status" : "open"
              },
              {
                  "objectid" : 12,
                  "message" : "not sold",
                  "status" : "open"
              }
  
  
  ]
  </code></pre>
  
  <p>I wrote the two snippets to be separately but i would like to know how i <code>catalog</code> can be part of the insert statement. I would also like to know if the <code>objectid</code> field in the catalog can be unique.</p>
  
  <p>Thanks.</p>