var obj = {
    foo:    'bar',
    base:   'ball'
};

for(var key in obj) {
    alert('key: ' + key + '\n' + 'value: ' + obj[key]);
}


$.each(obj, function(key, value) {
    alert('key: ' + key + '\n' + 'value: ' + value);
});




d

+ Recent posts