title: Knockout.js If condition in a for each loop
body: <p>I have a view with <code>Knockout Js</code> which has a loop. I need to add an if condition for one of them. I followed <a href="https://stackoverflow.com/a/9178123/4761773">this answer</a> but that does not seem to work.</p>
  
  <p><strong><em>My code :</em></strong></p>
  
  <pre><code>&lt;!-- ko foreach: systems --&gt;
  &lt;div class="form-group system-status-row border-left border-green"&gt;
      &lt;div class="col-sm-2 control-label"&gt;
          &lt;label data-bind="text: type"&gt;&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-7"&gt;
          &lt;div class="btn-group btn-group-sm status-btns four-btns"&gt;
              &lt;button type="button" class="btn btn-success"&gt;Operational&lt;/button&gt;
              &lt;button type="button" class="btn btn-warning"&gt;Partial&lt;/button&gt;
              &lt;button type="button" class="btn btn-danger"&gt;Non Operational&lt;/button&gt;
              &lt;!-- ko if: type !== "Generator" --&gt;
              &lt;button type="button" class="btn btn-inverse"&gt;On Generator&lt;/button&gt;
              &lt;!-- /ko --&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;!-- /ko --&gt;
  </code></pre>
  
  <p>One of the options in type is Generator but the fourth button is still shown even for that row. Am I missing something?</p>