title: For loop in javascript object
body: <p>Maybe I'm really tried but not sure why this is not working, I'm trying to get back the correct value from the var object </p>
  
  <pre><code>for (i = 1; i &lt; 11; i++) {
          (function(i) {
              var EFPStart = form.formData.plantSample[i].EFPStart;
              console.log(EFPStart);
              $('#PO-'+i+'-EFP-start').val(EFPStart);
          }(i));
      }
  </code></pre>
  
  <p>and here is the 
  form data </p>
  
  <pre><code>formData: 
    plantSample1: 
      CE: 0EFAEnd:1
      EFAStart: 1
      EFPEnd: 1
      EFPStart: 1
  plantSample2: 
      CE: 0EFAEnd:1
      EFAStart: 1
      EFPEnd: 1
      EFPStart: 1
   plantSample3: 
      CE: 0EFAEnd:1
      EFAStart: 1
      EFPEnd: 1
      EFPStart: 1
  </code></pre>