title: Posting multiple arrays with $http service in AngularJS
body: <p>I am using <a href="/questions/tagged/angularjs" class="post-tag" title="show questions tagged &#39;angularjs&#39;" rel="tag">angularjs</a>and have two arrays that I would like to post to a <a href="/questions/tagged/node.js" class="post-tag" title="show questions tagged &#39;node.js&#39;" rel="tag">node.js</a> server to be processed and sent in a confirmation email. Any thoughts on the how to properly submit these arrays? </p>
  
  <p><strong>Here are the two arrays:</strong></p>
  
  <pre><code>var array1 = vm.contacts;
  var array2 = vm.projects;
  </code></pre>
  
  <p><strong>$http service:</strong></p>
  
  <pre><code>data = array1; // Is it possible to add array2 here too?
  
  $http.post('http://localhost:9000/api/emails', data)
    .then(function(response) {
        console.log(response);
  
      }, function(response) {
        console.log('error', response);
      }
  </code></pre>