var_dump equivalent in javascript code example
Example 1: jquery var_dump array
function dump(obj) {
var out = '';
for (var i in obj) {
out += i + ": " + obj[i] + "\n";
}
alert(out);
}
Example 2: jquery var_dump array
dump(field.choices[i]);