title: JsRender If conditions comparing variables between child objects
body: <p>I am trying to achieve this in JsRender.
  As You can see from the code below, SubMenuItems  and SubMenuPages are child objects in a array of objects.However, I would like to compare a value in the first Object with a value in the second respectively.I have only qualified  the if condition just so it is clear what I'm trying to accomplish.</p>
  
  <p>So basically I would like to access an id variable in one child object and then check against  another variable in another object.
  I am a bit unsure as to the syntax regarding this , since all i tried kept returning nothing.</p>
  
  <pre><code>    {{for SubMenuItems}}
               &lt;li&gt;&lt;a href="#"&gt;{{&gt;Name}}&lt;/a&gt;&lt;/li&gt; 
               &lt;ul&gt;
                      {{for SubMenuPages}}
  
                              {{if SubMenuItems.PageMenuId == SubMenuPages.Id }}
  
                              &lt;li&gt;&lt;a href="{{&gt;PageUrl}}" &gt;{{PageName}}&lt;/a&gt;&lt;/li&gt; 
  
  
                              {{/if}}
  
  
                      {{/for}}
  {{/for}}
      &lt;/ul&gt;
  </code></pre>