title: Mustache - How to detect array is not empty?
body: <p>I want to implement the following logic with Mustache:</p>
  
  <pre><code>{{#if users.length &gt; 0}}
      &lt;ul&gt;
          {{#users}}
              &lt;li&gt;{{.}}&lt;/li&gt;
          {{/users}}
      &lt;/ul&gt;
  {{/if}}
  
  // eg. data = { users: ['Tom', 'Jerry'] }
  </code></pre>
  
  <p>Should I modify the <code>users</code> structure to meet the need? For example:</p>
  
  <pre><code>{{#hasUsers}}
      &lt;ul&gt;
          {{#users}}
              &lt;li&gt;{{.}}&lt;/li&gt;
          {{/users}}
      &lt;/ul&gt;
  {{/hasUsers}}
  
  // eg. data = { hasUsers: true, users: ['Tom', 'Jerry'] }
  </code></pre>