Looping through object in JavaScript
<pre><code>if(properties != undefined)
{
    foreach(key in properties)
    {
        dialogProperty.key = property[key];
    }
    alert(dialogProperty.close);
}
</code></pre>

<p>How can I achieve/fix the above code? I think the above code is self explanatory.</p>
