title: Adding Iterator Variable to an Object Name
body: <p>I have the following for loop:</p>
  
  <pre><code>for (var i = 2; i &lt; 7; i++) {
       if (cookieJSON.Cases.mdata+i.toString() == undefined)
            return i;
  
  }
  </code></pre>
  
  <p>I want the object name to equal <code>cookieJSON.Cases.mdata2</code> or <code>cookieJSON.Cases.mdata3</code> or <code>cookieJSON.Cases.mdata4</code> and so on.</p>
  
  <p>How can I get this to work?</p>