title: node.js - Bad ordering in POST request using Postman
body: <p>I'm learning node and I use Postman to execute those request with parameters in the body.</p>
  
  <p>For the router: router.post('/locations', ctrlLocations.locationsCreate);
  here is the controller:</p>
  
  <pre><code>module.exports.locationsCreate = function (req, res) {
      Loc.create({
          name: req.body.name,
          address: req.body.address,
          facilities: req.body.facilities.split(","),
          coords: [parseFloat(req.body.lng), parseFloat(req.body.lat)],
          openingTimes: [{
              days: req.body.days1,
              opening: req.body.opening1,
              closing: req.body.closing1,
              closed: req.body.closed1,
          },{
              days: req.body.days2,
              opening: req.body.opening2,
              closing: req.body.closing2,
              closed: req.body.closed2,
          }]
      },
      function(err, location){
          if(err){
              sendJSONresponse(res, 400, err);
          } else{
              sendJSONresponse(res, 201, location);
          }
      }); 
  };
  </code></pre>
  
  <p>Here you can see my DB model for 'locations':</p>
  
  <pre><code>var mongoose = require('mongoose');
  
  var openingTimeSchema = new mongoose.Schema({
      days: {type: String, required: true},
      opening: String,
      closing: String,
      closed: {type: Boolean, required: true}
  });
  
  var reviewSchema = new mongoose.Schema({
      author: {type: String, required: true},
      rating: {type: Number, required: true, min: 0, max: 5},
      reviewText: {type: String, required: true},
      createdOn: {type: Date, "default": Date.now}
  });
  
  var locationSchema = new mongoose.Schema({
      name: {type: String},
      address: String,
      rating: {type: Number, "default":0, min: 0,  max: 5},
      facilities: [String],
      coords: {type: [Number], index:'2ndsphere'},
      openingTimes: [openingTimeSchema],
      reviews: [reviewSchema]
  });
  
  mongoose.model('Location', locationSchema);
  </code></pre>
  
  <p>I don't have any problem to create a new 'location' by using mongodb console, but I'm facing problems when using Postman: the response sent change the order of some of the 'fields' and add unwanted ids to 'opening times'.</p>
  
  <p>Here the x-www-form-urlencoded request as a bulk edit:</p>
  
  <pre><code>name:Paquito's Bar
  address:41 Lower Brook St, Reading RG1 2AQ, UK
  rating:4.5
  facilities:WiFi, Coffe, Sexy Staff
  lng:-0.9722977
  lat:51.4494778
  days1:Monday -Friday
  opening1:8:00am
  closing1:5:00pm
  closed1:false
  days2:Saturday - Sunday
  opening2:10:00am
  closing2:12:00pm
  closed2:false
  </code></pre>
  
  <p>And here the result:</p>
  
  <pre><code>{
    "__v": 0,
    "name": "Paquito's Bar",
    "address": "41 Lower Brook St, Reading RG1 2AQ, UK",
    "_id": "5774ecf8bcdead7c368a7648",
    "reviews": [],
    "openingTimes": [
      {
        "days": "Monday -Friday",
        "opening": "8:00am",
        "closing": "5:00pm",
        "closed": false,
        "_id": "5774ecf8bcdead7c368a764a"
      },
      {
        "days": "Saturday - Sunday",
        "opening": "10:00am",
        "closing": "12:00pm",
        "closed": false,
        "_id": "5774ecf8bcdead7c368a7649"
      }
    ],
    "coords": [
      -0.9722977,
      51.4494778
    ],
    "facilities": [
      "WiFi",
      " Coffe",
      " Sexy Staff"
    ],
    "rating": 0
  }
  </code></pre>
  
  <p>I'm creating  here documents for the API, and as you can see the ordering is bad, and I don't want _id's in the opening times: I rather force the id creation when is needed via code than automatically creation.</p>
  
  <p>Maybe there's a better way to use Postman... Any help will be useful.</p>
  
  <p>Thanks in advance!</p>