foreach in javascript

jQuery:

$.each(abg_mapping, function(key, item){
	//console.log(key);
	$(td + ' input[name*="' + item[2] + '"]').val(data[key]);
});

Native Javascript

for (var prop in obj) {
	var item = obj[prop]
	result += objName + "." + prop + " = " + item + "\n";
}