I'm trying to create a cookie array using jquery's json. Here is the script which works so far except for the array part. Can someone please tell me how I can do an array like this...

```
    <script type="text/javascript">

       //The database value will go here...
       var cookievalue= {'tid1':'ticvalue1','thid1':'thidvalue1','tid2':'ticvalue2','thid2':'thidvalue2'};

       //Create a cookie and have it expire in 1 day.
       $.cookie('cookietest', cookievalue, { expires: 1 });

       //Write the value of the cookie...
       document.write($.cookie('cookietest'));

    </script>

```

The problem I'm having is when I pass the array to the cookie it is storing `[object object]` instead of the array values. So if I loop through the data then I will multiple cookies instead of one cookie with the array value stored in