Skip to content

Instantly share code, notes, and snippets.

@franksmule
Last active January 2, 2016 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save franksmule/8374388 to your computer and use it in GitHub Desktop.
Save franksmule/8374388 to your computer and use it in GitHub Desktop.
Handlebars.js get element from array
getElement: function(array, key) {
if(array != undefined && array != null && array.length > 0 && array[key] != undefined){
return array[key].toString();
}
return "";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment