sstephenson / eco

Embedded CoffeeScript templates
MIT License
1.71k stars 70 forks source link

How to output an object in eco #65

Open ezmiller opened 10 years ago

ezmiller commented 10 years ago

Hi, I'm new to CoffeeScript and Eco. I'm trying to understand how to output a javascript object to the screen for debugging purposes. I tried something like this:

<%= document.write {'dog','cat'} %>

But it does not seem to recognize the document piece. I'm sure I'm missing something big here, but I can't seem to find any documentation about eco to set me on the write course, and this seems to work in pure CoffeeScript. Any help would be much appreciated.