title: Get numeric value only from form that has ids as array with JQuery?
body: <p>I was searching for solution, but did not find any </p>
  
  <p>I have this code:</p>
  
  <pre><code>&lt;form name="frm_hs100"&gt;
      &lt;input id="hs100[1]" name="hs100[1]" type="checkbox"&gt;
      &lt;input id="hs100[2]" name="hs100[2]" type="checkbox"&gt;
  &lt;/form&gt;
  
  $('[name^=hs100]').click(function() {
      if ($(event.target).is(":checked")){
          //true
      }
      else {
          //false
        }
      console.log(event.target.id);
      });
  </code></pre>
  
  <p>console.log prints "hs100[1]", but how do I get only #1 or #2 based on clicked checkbox?</p>