Accessing array in spacebars using @index

Greetings my friends :D, I’ve this template:

 <template name="filters_applied">
{{#each filters}}
	<button class="f_button" >{{filters.[@index]}}</button>

and this helper:

	filters: -> Session.get("buttons_clicked")

Inside the “buttons_clicked” key there is an array of the applied filters(the array is filled in another template).
I need to display the index’s value of the array as the text value inside the button element.
I’ve tried {{filters.[@index]}}, {{filters.[{{@index}}]}} and it doesn’t work(it displays nothing), but the @index special variable works if i use it like {{@index}}.
Any idea to make this work without utilizing another helper? I hope i’ve explained myself well. Thanks for the help :slight_smile:

well, as you are already iterating over “filters”, what about {{this}} ? :smiley:

1 Like

Thanks for the help man! :smiley: