title: How do I compare two different API requests to get and display duplicate values in Reactjs?
body: <p>I have this situation:</p>
  
  <p>I am receiving two different requests from API using axios. What I need to do is compare both to show if this value is duplicate.
  1. one of these requests contain a nested array with a author id and the another one contains the same id. If the id are equals I will need to show the author name, that is inside <em>authors</em>.</p>
  
  <pre><code>render() {
      const { posts } = this.state;
      const { authors } = this.state;
  
      // mapeia ids dos autores dentro de Posts
      const authorIdPost = posts.map((post) =&gt; (
        post.metadata.authorId
      ));
        console.log(authorIdPost);
  
        //mapeia ids de autores dentro de Autores 
      const authorId = authors.map((author) =&gt; (
        author.id
      ))  
        console.log(authorId);
  </code></pre>
  
  <p>How I can get this?</p>