title: delete nested object base on key in react
body: <p>I want to remove an object of an object in react, what I'm planning to do is get the current state and assign it to a variable, alter that variable, use setState to assigned the altered variable to state. Like this</p>
  
  <pre><code>constructor() {
      super()
      this.state = {
        obj: {
          "0": {
            something: 123
          },
          "1": {
            another_thing: 'abc'
          }
        }
      }
    }
  
    deleteOneObj(index) {
      let newObjState = this.state.obj[index]
      delete newObjState
    }
  
    render() {
      return(&lt;h1&gt;hello&lt;br /&gt;
        &lt;button onClick={()=&gt;this.deleteOneObj(1)}&gt;
          delete one obj
        &lt;/button&gt;
      &lt;/h1&gt;)
    }
  </code></pre>
  
  <p>But delete newObjState doesn't seem to work.</p>