I'm trying to save an array which includes a object to a hidden field in a form. When I do so, the object doesn't show up, but is display like "[object Object]" instead.
arrayObject = [
"something",
{ objectKey: "something else", otherObjectKey: "totally different" },
"quite similar"
];
$("input").val(arrayObject);
This outputs
"something,[object Object],quite similar"
What can I do different?