title: Display properties of an object based on value using express
body: <p>I'm trying to display properties of an object based on value. So basically if they value of the property is equal to &quot;film&quot; the property should display. This is the code I have so far:</p>
  <pre><code>&lt;% fidos.forEach(fido =&gt; { %&gt;
          &lt;%=fido.renown === &quot;Film&quot; %&gt;
      &lt;% }) %&gt;
  </code></pre>
  <p>The browser returns:</p>
  <p>true true false false false false false false</p>
  <p>But I would like it to display the name and image for the 2 true ones. I believe I should try an if else statement but I'm not sure how to set it up. I've tried:</p>
  <pre><code>&lt;% fidos.forEach(fido =&gt; { %&gt;
           &lt;% if fido.renown === &quot;Film&quot; { %&gt;
              &lt;%=fido.name%&gt;
           &lt;a href=&quot;/fidofame/&lt;%=fido._id; %&gt;&quot;&gt;
              &lt;&lt;img class=&quot;image&quot; src=&lt;%=fido.image %&gt; alt=&lt;%=fido.name %&gt;&gt; --&gt;
          &lt;&lt;/a&gt;
          &lt;% } else %&gt;
      &lt;% }) %&gt;
  </code></pre>
  <p>This returns a SyntaxError to the browser. I'm sorry for this basic question. I've only been programing for like 2 months.</p>