Loop through all properties of a javascript object
The formal answer is to loop properties in object and do a if hasOwnProperty. It works for arrays and objects.
for (var property in object)
{
if (object.hasOwnProperty(property))
{
// do stuff
}
}
Recent Comments