Skip to content

Instantly share code, notes, and snippets.

@mikesurowiec
Created November 30, 2012 17:30
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikesurowiec/4177193 to your computer and use it in GitHub Desktop.
Save mikesurowiec/4177193 to your computer and use it in GitHub Desktop.
from ejs array of objects to js array
<script>
var resultsArr = [];
<% for (var i=0, len=results.length; i<len; i++) { %>
resultsArr.push(<%- results[i] %>);
<% } %>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment