title: Get individual input values from dynamic input fields
body: <p>After creating dynamic inputs along with its dynamic id's by append, only the latest generated input field gives values</p>
  <p>Other dynamic input fields return empty string</p>
  <p>Note: I'm able to get all values of dynamic inputs by using for loop and pushing inside an array, but i also want to get each input individually on key up . But only final input field created gives value</p>
  <p>Here is my fiddle,</p>
  <p><a href="https://jsfiddle.net/xd8nvktf/3/" rel="nofollow noreferrer">https://jsfiddle.net/xd8nvktf/3/</a></p>
  <p>Not able to come up with a solution, Help is appreciated</p>
  <p>--Thanks</p>
  <p>HTML</p>
  <pre><code>&lt;head&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css&quot; integrity=&quot;sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u&quot; crossorigin=&quot;anonymous&quot;&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;button type = &quot;button&quot; class = &quot;btn btn-primary&quot; id = &quot;addInput&quot;&gt;Add Input Fields&lt;/button&gt;
  
  &lt;div id = &quot;inputAdder&quot;&gt;
  
  &lt;/div&gt;
  
  
  
  &lt;/body&gt;
  </code></pre>
  <p>JS/JQUERY</p>
  <pre><code>var a = 0;
  var fieldValue;
  
  var dataStored = [];
  var valueStored = [];
  
  $(&quot;#addInput&quot;).on(&quot;click&quot;, function() {
  
    a += 1;
  
    fieldValue = `#filter-value${a}`;
  
    $(&quot;#inputAdder&quot;).append(
  
      `&lt;div class = &quot;row&quot; id=&quot;appender${a}&quot;&gt;
              
  &lt;div class=&quot;col-md-4 padderSpace&quot;&gt;
                  &lt;input id=&quot;filter-value${a}&quot;&gt;
              &lt;/div&gt;
              
  &lt;/div&gt;`
    )
   
     dataStored.push({value:fieldValue});
     console.log(dataStored) 
  
  })
  
  
  $(&quot;#inputAdder&quot;).on(&quot;keyup&quot;,fieldValue,changeFunc);
  
     
    function changeFunc(){
  
  console.log($(fieldValue).val()); 
  
  valueStored = [];
    
    for(let i = 0;i&lt;=dataStored.length;i++){
  
  valueStored.push({value:$(dataStored[i].value).val()}) 
  
  console.log(valueStored)
    
    }
    
    }
     
  </code></pre>