I am using angularjsand have two arrays that I would like to post to a node.js server to be processed and sent in a confirmation email. Any thoughts on the how to properly submit these arrays?
Here are the two arrays:
var array1 = vm.contacts;
var array2 = vm.projects;
$http service:
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);
}