title: How Do I Check For an Empty Object in a Meteor Template?
body: <p>I have a template data context like this:</p>
  
  <pre><code>data = {
      "attribute1": {
          "attribute2": {}
      }
  }
  </code></pre>
  
  <p>And in the meteor template I am doing something like this:</p>
  
  <pre><code>{{#with attribute1}}
      {{#if attribute2}}
          show some content
      {{/if}}
  {{/with}}
  </code></pre>
  
  <p>I don't want to show anything if attribute2 is an empty object. However I tried both <code>{{#with attribute2}}{{/with}}</code> and <code>{{#if attribute2}}{{/if}}</code> And it's still rendering the content inside even if it's an empty object.</p>
  
  <p>What is the correct way to check if the object is empty in spacebar template? Or is it even possible?</p>