I have an object that looks like this
var obj = { p1 : true, p2 : true, p3 : false }
I am looking to try and pass this object as part of a post request.
however on the other end (in php) all I get is
[object Object]
How can I send an object via post?
basically what I am trying to do is
I have an input that is hidden and is created like so
<input id="obj" type="hidden" name="obj[]">
which is part of a hidden form.
when a button is pressed I have
$(#obj).val(obj);
$('form').submit();
Please no suggestions to use ajax as I must do it this way as it is to download a dynamically created file.