title: How to remove property from objects inside array in react state
body: <p>How to remove a property from objects inside an array in the React state?</p>
  
  <p>I am getting the error:</p>
  
  <blockquote>Kim.tsx:150 Uncaught TypeError: documents.forEach is not a function</blockquote>
  
  <p>Code:</p>
  
  <pre><code>  // Function to remove Mark as Reviewed property from objects inside the document array
    public hideMarkAsReviewed() {
  
        // Creates new array of objects
        let documents = {...this.state.documents};
  
        // Deletes property from all objects in array
        documents.forEach(d =&gt; { delete d['Mark as Reviewed'] });
  
        // Updates document state with the object
        this.setState({documents: documents});
  
    }
  </code></pre>