title: Match id in array
body: <p>I have an array let's say arr[] and it has value like</p>
  
  <pre><code>0:"r1"
  1:"&lt;div&gt;&lt;input type='checkbox' id = 'e.r1' value='qw'/&gt;qw&lt;br&gt;&lt;/div&gt;"
  2:"&lt;br/&gt;"
  3:"r2"
  4:"&lt;input type="text" id="e.r2" size="30" maxlength="32" value=""&gt;"
  5:"&lt;br/&gt;"
  6:"r3"
  7:"&lt;input type="text" id="e.r3" size="30" maxlength="32" value=""&gt;"
  8:"&lt;br/&gt;"
  </code></pre>
  
  <p>I have a dynamic content id which I need to find from array if its exist or not,
  So what I did is ,</p>
  
  <pre><code>var removedTagIndex =1;
  var dynVal = "&lt;div&gt;&lt;input type='checkbox' id = 'e.r1' value='qw'/&gt;qw&lt;br&gt;&lt;/div&gt;"
  arr.some(function(item, index) { if($(item.replace(/[:/]/g, '')).attr('id') == $(dynVal).attr('id');) { removedTagIndex = index; return true; } });
  </code></pre>
  
  <p>but I'm getting arr[0] as an index while its on 1st index. how can I find proper index where id exist in array for both condition
  1> dynVal's id is: "e.r1" and
  2> dynVal's id is: "e.r2".. tell me if you don't get it.. Thankyou</p>