<script src="json2.js"></script> 

<script> 

 var date = {myArr : ["a" , "b" , "c" , "d"] , count : 4}; 

 var str = JSON.stringify(date); 

 alert(str); 

</script>