title: How to pass an array/objects with spacebars to a meteor template?
body: <p>I am trying to construct a meteor template for simplifying creating radio buttons on a form. I would like to be able to pass an array or object as an argument through spacebars to the template. How can I pass an array/object as an argument or is this even possible?</p>
  
  <p>Template:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;template name="radioButton"&gt;
    &lt;div class="mdl-textfield mdl-js-textfield"&gt;{{radioLabel}}&lt;/div&gt;
    {{#each getRadioOptions}}
    &lt;label class="mdl-radio mdl-js-radio mdl-js-ripple-effect" for="{{radioOptionID}}"&gt;
      &lt;input type="radio" id="{{radioOptionID}}" class="mdl-radio__button" name="{{radioID}}" value="{{optionID}}"&gt;
      &lt;span class="mdl-radio__label"&gt;{{optionLabel}}&lt;/span&gt;
    &lt;/label&gt;
    {{/each}}
  &lt;/template&gt;
  </code></pre>
  
  <p>Template helper:</p>
  
  <pre class="lang-js prettyprint-override"><code>Template.radioButton.helpers({
      getRadioOptions: function () {
          console.log("getRadioOptions called");
          console.log(this);
          console.log(this.radioOptions);
          return this.radioOptions;
      },
      radioOptionID: function() {
          return this.radioID+"-"+this.optionID;
      }
  });
  </code></pre>
  
  <p>Attempted spacebar notation:</p>
  
  <pre><code>{{&gt; radioButton radioID="sampleID" radioLabel="Sample Radio Buttons"
      radioOptions=[{optionID:"option1",optionLabel:"Option One"},
                    {optionID:"option2",optionLabel:"Option Two"}] }}
  </code></pre>
  
  <p>After running this notation and looking at the browser console, I get back this: (which shows that only <code>null</code> was passed for <code>radioOptions</code>)</p>
  
  <pre><code>getRadioOptions called
  Object {radioID: "sampleID", radioLabel: "Sample Radio Buttons", radioOptions: null}
  null
  </code></pre>