title: How to compare two tables for data existence and set the color in the retrieved data in reactjs
body: <p>I have two tables where one contains different jobs (<code>joblist</code>) and the other is (<code>savedjobs</code>) which stores the copy of that particular job from <code>joblist</code>. It is something like bookmarking the job for later use.</p>
  
  <p>If I display all the jobs in the main screen I must see the saved jobs with a highlight saying that it is saved.</p>
  
  <p>I tried like this:</p>
  
  <pre><code>{joblists &amp;&amp;
    joblists.map(joblist =&gt; {
      {
        resultJobs &amp;&amp;
          resultJobs.map(job =&gt; {
            if (joblist.id === job.id)
              return (
                &lt;i
                  id="heart"
                  name={joblist.id}
                  className="fas fa-heart float-right pr-4 text-danger"
                  onClick={this.saveJob1}
                /&gt;
              );
          });
      }
    })
  }
  </code></pre>
  
  <p>But what if there is no saved jobs? Can someone help?</p>