Iterate over Record in a template


#1

I have a component:

<script type="text/x-handlebars" id="components/filter-options">
  {{#each filterOptions}}
  <li>{{name}}</li>
  {{/each}}
</script>

filterOptions is an object that was set using :

this.store.find(“filterOption”);

I’m assuming this is returning a RecordArray but I can’t iterate over it like this and am getting the following error:

Assertion failed: The value that #each loops over must be an Array. You passed [object Object]


#2

Can we see more of the code, specifically how you’re setting filterOptions property.