Skip to content

Instantly share code, notes, and snippets.

@joncostello
Created April 22, 2012 21:30
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 joncostello/2467056 to your computer and use it in GitHub Desktop.
Save joncostello/2467056 to your computer and use it in GitHub Desktop.
Replace attributes with iterative object values
<ul class="items">
<li>
<a class="name" href="/items/1">test1</a>
</li>
<li>
<a class="name" href="/items/2">test2</a>
</li>
</ul>
<ul class="items">
<li>
<a class="name" href="/items/id"></a>
</li>
</ul>
{
items : [ {name : 'test1', id : 1}, {name : 'test2' : id : 2} ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment