title: Unable to access objects in req.body array from Mongoose
body: <p>OrderSchema</p>
  
  <pre><code>var OrderSchema = new Schema({
          OrderDate : {type: Date, default: Date.now()},
          userid : {type : Number, ref:'User', default: '0'}, 
          totalPrice : {type : Number, default: '0'},
          totalQuantity : {type : Number, default: '0'},
          status : {type : Boolean, default: 'false'}, 
          items : [{
              _id : {type: Schema.Types.ObjectId, ref:'Product'},
              quantity : {type : Number, default: '0'}
          }]
      })
  </code></pre>
  
  <p>on POSTing via POSTMAN , console.log(req.body) form Nodejs Server returns</p>
  
  <pre><code>{ totalPrice : '755',
  totalQuantity: '12',
  userid: '3423324242',
  address: 'dsadsd',
  items: '{'_id':'5528cfd2e70144e020cb6495', 'quantity':'1' },{'_id':'5528cfd2e70144e012ab6495','quantity':'5' },{'_id':'5528cfd2e70144e020bd6495', 'quantity':'435' },{'_id':'5528cfd2e12144e012ab6495','quantity':'3' }' }
  </code></pre>
  
  <p>First of all I'm not able to access any objects in items e.g. items[0] as it simply returns '{' maybe because it is treating it as an char array.
  Second what I wanna do it create a new Order Instance and make some loop so as to push all the item objects into the items array of the OrderSchema.
  So far only success I've got saving data in items array it I send it individually as _id and quantity and push it as </p>
  
  <pre><code>order.items.push({
  '_id' : req.body._id,
  'quantity' : req.body.quantity })
  </code></pre>
  
  <p>but using the above method I wont be able to push multiple item objects into the array as these items are objects sent from a shopping Cart.
  So basically we want to create a new order and then push all these items in the items array</p>