Basically, if you have added the value as an associative array, then this code would works:
var value = { "aaa": "111", "bbb": "222", "ccc": "333" };
var temp = [];
$.each(value, function(idx2,val2) {
var str = idx2 + ":" + val2;
temp.push(str);
});
console.log(temp.join(", "));
Also, each() function can only help you to iterate over an array.
I hope this will help.
Want to know more about Java? Prefer this tutorial on Learn Java.
Want to become a Java expert? join Java Certification now!!