For example we have object like blow:
var data = { Name: 'rohit', Value: '0' };
Properties can be accessed by the property name like below
data.Name
data["Value"]
Now we want to view all properties of Object, then we will write
for (var key in data) {
alert(key);
}
or same can be achieve with below function:
for each (var value in data) {
alert(value);
}