title: Unable to store appended data into array
body: <p>Hi here is a jquery function i am working on i have appended a particular div. The div has 2 inputs I am trying to capture the input values in data_to_send array but it only captures one input because the names are not unique.</p>
  
  <pre><code>function() {
          $('#si-goal-link-btn').click(function() {
              $('#si-goal-links').append('&lt;div class="goal-link si-goal"&gt;&lt;label for="iconURL"&gt;Icon URL&lt;/label&gt;&lt;input class="si-goal-link form-control" type="file" name="iconURL"&gt;&lt;br&gt;&lt;label for="title"&gt;Title&lt;/label&gt;&lt;input type="text" placeholder="Enter title" class="si-goal-link form-control" name="title"&gt;&lt;br&gt;&lt;hr&gt;&lt;/div&gt;')
          })
  
          $('form #si-btn').click(function(e) {
              e.preventDefault()
              var self = $(this)
              var data_to_send  = {}
  
              $('form').find('.si-input').each(function() {
                  if ( $(this).attr('name') != undefined) {
                      if ($(this).hasClass('si-wysiwyg')){
                          data_to_send[$(this).attr('name')] = $(this).code()
                      }
  
                      if ($(this).hasClass('si-goal-link')) {
                          //UNABLE TO STORE THE VALUE HERE
                          data_to_send[$(this).attr('name')] = $(this).val()
                      } 
  
                      data_to_send[$(this).attr('name')] = $(this).val()
                  }
              })
  
              var url = $('form').data('si-location')
              $.post(url, data_to_send, function(data) {
  
              })
  
          })
      }
  </code></pre>
  
  <p>How do i capture this data and store it as an array within an array over here ? </p>