-
-
Save wycats/1370948 to your computer and use it in GitHub Desktop.
Handlebars No Name Loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The JSON | |
array = [ | |
{ | |
created_at: "2011-10-19T16:22:30Z", | |
id: 1, | |
link: "http://abcnews.go.com/Business/video/job-search-social-media-ditch-resume-hunt-nontraditional-ways-internet-professional-contacts-business-13581468", | |
title: "ABC News: Job Search Through Social Media", | |
updated_at: "2011-10-19T16:22:30Z" | |
}, | |
{ | |
created_at: "2011-10-19T16:22:30Z", | |
id: 2, | |
link: "http://www.adweek.com/news/advertising-branding/talent-takes-f-train-130622", | |
title: "Adweek: Talent Takes the F Train", | |
updated_at: "2011-10-19T16:22:30Z" | |
}, | |
{ | |
created_at: "2011-10-19T16:22:30Z", | |
id: 3, | |
link: "http://www.bloomberg.com/video/68220332", | |
title: "BloombergTV: Social Media: Connecting to Customers", | |
updated_at: "2011-10-19T16:22:30Z" | |
} | |
] | |
json = { objects: array } | |
// Handlebars code - I need to loop through the above items. | |
{{#each objects}} | |
<li><a href='{{link}}'>{{title}}</a></li> | |
{{/each}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment