title: Soy Template syntax for if statement
body: <p>I have a quick question regarding Soy template syntax and parsing an object.  So I have an object I would like to conditionally print that looks like this:</p>
  
  <pre><code>{'paragraph':'Some important text that you want printed.'},
  </code></pre>
  
  <p>I was wondering how I could test against the first argument of 'paragraph'.  I would like to conditionally call a subtemplate based on that parameter.  For example</p>
  
  <pre><code>{'list':['item 1', 'item 2']}
  </code></pre>
  
  <p>I would like to try and do something like this:</p>
  
  <pre><code> /**
    * Prints the text object specified.
    * @param textToPrint All of the items you want rendered on the page.
    */
   {template .printText}
      {foreach $textItem in textToPrint}
        {if $textItem[0] is 'paragraph'}          //THIS IS THE LINE IN QUESTION
           {call .paragraph}
              {param paragraph: $textItem[0] /}
           {/call}
        {else}
           {call .list}
              {param listItem: $textItem[0] /}
           {/call}
        {/if}
      {/foreach}
    &lt;/ul&gt;
   {/template}
  </code></pre>
  
  <p>Does anyone know the syntax to accomplish something like this?  Thanks!</p>