How can I access the object obj
properties using a for
loop?
Example:
var obj = {
id: 1,
description: "This space is for description",
severity: "This is severity",
assignedTo: "Name of the assigned person",
status: "Issue Status "
}
Note: I am talking about this kind of loop for (var i =0;i <= obj.length;i++)
, not a for ... in
loop. I want to display it using document.write()
. Please, no jquery, only javascript.