I want to traverse through JavaScript object\'s property
var obj = { a: \'value1\', b: \'value2\', c: \'value3\', d: \'va
You should check that the property belongs to the object and not a prototype.
for (var prop in obj) { if (obj.hasOwnProperty(prop)) { obj[prop] = 'xxx'; } }