How can I append an array of objects to an already existing array?
<p>I created the following array:</p>

<pre><code>$scope.testAccounts[0] = { id: 99, name: "Select Account" };
</code></pre>

<p>I tried </p>

<pre><code>$scope.testAccounts.push(result.data);
</code></pre>

<p>where results.data looks something like this:</p>

<pre><code>[{ id: 1, name: "x" },{ id: 2, name: "y" }]
</code></pre>

<p>However this does not seem to work as it tries to add an array as the second element. What I need is to have the contents of the array result.data appended to the array $scope.testAccounts</p>

<p><strong>Please note</strong> that all the examples I have seen so far seem to not work if the array is an array of objects. This is what I have. Thanks</p>
