Get value of the first value pair
<p>I’m trying to get the value of the first value pair from a form submission via AJAX. Here’s what the var Formdata looks like (id=4&amp;name=somename&amp;blah=blah). How do I get the id value of 4? As you can see I was trying several ways but had no luck. Any suggestion would be much appreciated, thanks in advance.</p>

<pre><code>$("#updatetask").validate({     
    submitHandler: function() {
    var formdata = $('#updatetask').serialize();
    var fistkey = formdata.split("&amp;",1);
    var tester = fistkey.slice(-1);
    alert(tester);
    /*
   $.post('/tasks/AJAXupdate', $('#updatetask').serialize(), function(data){
    var returnMsg = data.replace(/^\s+|\s+$/g, '');
    if (returnMsg == 'error'){
        alert(returnMsg+': Unable to update task.');
    }else{
        parent.$.fancybox.close();
    }
   });*/
return false;
    }       
});


});
</code></pre>
