title: Understanding For-in Loop
body: <p>Here I have variable that has an object whose one value is an array of objects
  eg. </p>
  
  <pre><code>var test = { "key1": val1,
  "key2": [{"a":1,
          "b":[{},{}]
          },
          {"a":1,
          "b":[{},{}]
          }]
     };    
  </code></pre>
  
  <p>I am now unable to understand why following piece of code iterates two times. Shouldnt it just iterate once as only 1 array element is present?</p>
  
  <p>code snippet: </p>
  
  <pre><code>for( index in test.key2)
  </code></pre>