I want to serialize a form into json, process the json object, then reserialize it to send to a php script via ajax.
Here is a rough example of what I want to do:
s = $('.dia_req_form').serialize();
j = //convert s to json ...HOW??
if(j.name)
{
alert("you must enter a name");
}
if(selectedID)
{
j.id = selectedID;
}
s = //serialize j ...HOW??
You can see the 2 parts that say HOW??