Passing dynamic data with Jquery Form Plugin

Passing dynamic data with Jquery Form Plugin

I'm using the  Jquery Form Plugin to submit a form with ajax on my wordpress site. I grab most of the fields from input data which is easy enough to process using $_POST but I need to add an extra array of data that I populate with jquery and then I need to send it with the formData so I can grab it in my php function that processes the form. So something like this.

  1.  var options = { url: ajaxurl, beforeSubmit: validatePost, success: showResponse, type: 'post', data: { action:'process_'+ editType +'_edit_form', }, cache: false, uploadProgress: function(event, position, total, percentComplete) { var percentVal = percentComplete + '%'; bar.width(percentVal) percent.html(percentVal); }, }; $('#post_edit').ajaxForm(options); function validatePost(formData, jqForm, options) { var postList = []; $.each($('.post-list li'), function() { postList.push($(this).data("postid")); }); formData.push({ postList: postList }); } 


postList is an array of numbers. When I check the console it shows that the postList array was added to the formData but I can't grab it on the php side. So how exactly do I make this work? The object it gets stored under just shows post List Array[1] so I'm wondering if that's the problem since the other objects all have a name and value.