title: how to fix codacy alert "Generic Object Injection Sink"
body: <p>Below is my code. I don't think there is any problem. </p>
  
  <p>How can I fool codacy? If I can't use <code>obj[key]</code>, then what the hell is this thing? There is no way I can avoid <code>[]</code>.</p>
  
  <pre><code>handleClick = (e, titleProps) =&gt; {
       const { index } = titleProps
       const newVal = this.state.activeIndexObj[index]? false: true
       let activeIndexObj = {...this.state.activeIndexObj}
       activeIndexObj[index] = newVal
       // Generic Object Injection Sink (security/detect-object-injection)
  </code></pre>