title: Can you apply visible binding based on the data currently being bound?
body: <p>I'm trying to set some content in a template to be visible only if the item being rendered is the "current item".</p>
  
  <p>Here is the code so far, I want to be able to only render a part of the inner template if the data item being rendered has <code>ID == window.viewModel.activeObject</code>.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;section data-bind='template: { name: "categoryTemplate", foreach: categories }'&gt;&lt;/section&gt;
  
  &lt;script type="text/html" id="categoryTemplate"&gt;
      &lt;section&gt;
          &lt;h2&gt;${Name}&lt;/h2&gt;
          &lt;section data-bind='template: { name: "objectTemplate", foreach: Objects }'&gt;&lt;/section&gt;
      &lt;/section&gt;
  &lt;/script&gt;
  &lt;script type="text/html" id="objectTemplate"&gt;
      &lt;article&gt;
          &lt;h3&gt;${Name}&lt;/h3&gt;
  
        (only render this if the object rendered has ID equal to viewModel.activeObject)
          {{html Text}}
  
      &lt;/article&gt;
  &lt;/script&gt;
  &lt;script&gt;
      $(document).ready(function(){
          window.viewModel = { categories : &lt;asp:Literal runat="server" ID="LiteralJSON" /&gt;,
              activeCategory: ko.observable(0),
              activeObject: ko.observable(0)
          };
  
          ko.applyBindings(window.viewModel);
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>How would I go about doing that?</p>