title: post array of objects into sails controller
body: <p>What does the controller need to look like to create a record for each object in the passed array? Do I create a for loop?</p>
  
  <p>Here's what I have:</p>
  
  <pre><code>Agent.findOneById(req.query[0].agentId, function(err, agent) {
    console.log(agent);
    for (i = 0; i &lt; req.query.length; i++) {
      Record.findOrCreate({userDN: req.query[i].userDN}, {
          name: req.query[i].name,
          owner: agent.id
      }).exec(function (err, newRecord) {
          if (err) return res.negotiate(err)
          res.json(newRecord);
      })
  }
  </code></pre>
  
  <p>This create one object, there are 15 items in the array.</p>
  
  <p>Here's one object from the array per the request:</p>
  
  <pre><code>query:
  { '0':
     { userDN: '99999',
       name: 'Test User',
       agentId: '4' },
  </code></pre>