Possible Duplicate:
Sending JSON jQuery Ajax to PHP and back
i need to send the following object to a php file i tried it through json stringify but could not do it .i dont want to change the format in which these attributes are already defined and also is json the only way to send such objects? i wand to do something like this
function contact()
{
contact.menu=null;
contact.access=null;
contact.state=null;
}
$.post("myfile.php",{contact:contact},function(data){alert(data);});
///php code
$contact= $_POST['contact'];
echo $contact['menu'];
thanks in advance