Adding values to serialised Array Jquery
<p>Im trying to add data to a preserialised array. Its not working. Anyone spot why?</p>

<pre><code>$("#show-friends").live("click", function() {
    var friendSelector = $("#jfmfs-container").data('jfmfs');   
    var sendArr = $(friendSelector).serializeArray();


    sendArr.push({ name: "userid", value: "&lt;?php echo $userId;?&gt;" });
    sendArr.push({ name: "fid", value: "&lt;?php echo $fid;?&gt;" });
    $.post({
         url:'test.php', 
         data: sendArr, 
         });
});  
</code></pre>

<p>Edit: I changed my code to:</p>

<pre><code> $("#show-friends").live("click", function() {
    var friendSelector = $("#jfmfs-container").data('jfmfs');  
    var sendArr = friendSelector.serializeArray();
        $.post({
             url:'test.php',
             data: "name=&lt;?php echo $userId;?&gt;&amp;fid=&lt;?php echo $fid;?&gt;&amp;jsondata="+sendArr,
             });
});  
</code></pre>

<p>However I get a error friendSelector.serializeArray is not a function</p>
