title: For loop for object?
body: <p>I have the next code in javascript. I deleted some unnecessary items because it went to long.</p>
  
  <pre><code>var options = {
      dhcode: true,
      commands: {
          bold: {
              enabled: true,
              view: true,
              exec: true,
              cmd: 'bold',
              param: null
          },
          italic: {
              enabled: true,
              view: true,
              exec: true,
              cmd: 'italic',
              param: null
          },
          underline: {
              enabled: true,
              view: true,
              exec: true,
              cmd: 'underline',
              param: null
          }
      }
  }
  </code></pre>
  
  <p>Now i want to get al data in the options.commands object. But everything what i try don't work. This is what i am trying:</p>
  
  <pre><code>for(var i=0;i&lt;options.commands.length;i++) {
  alert(options.commands[i].cmd);
  }
  </code></pre>
  
  <p>Please help me.</p>