stringify using jquery

often we need to check data inside an object,map,array. We can use following code to convert them
into string.
 
$.each(haystack, function(key, value) { 
alert(key + '=> ' + value);
});
where haystack can be array,object,map etc.