append json objects into json array
<p>I have an form and would like to append the contents of it to an existing array. <br />
I am using <code>JSON.stringify( $('#myForm').serializeObject() )</code> to convert my form elements into <code>json</code> objects. <br />
The form has user info that i would like to append into <code>myArr</code> then append this list into an existing array. <br /><br />
<code>myArr</code> is populating fine, its just appending that into <code>existingJsonArray</code> i seem to be having problems with.<br /><br />
I <a href="http://stackoverflow.com/questions/617036/appending-to-a-json-object">saw this</a> but since <code>JSON.stringify</code> creates the full json array would i need to knock out the <code>[{</code> and <code>}]</code> ?<br /><br />
Is this the correct approach?</p>

<pre><code>var existingJsonArray = [];
var myArr = [];

myArr.unshift( JSON.stringify( $('#myForm').serializeObject() ) );

existingJsonArray.unshift(myArr);
</code></pre>
