The goal is that in a separate file I have a list of, say, items. These items are defined as "{name:'Sentient Sword', type: 'sword', description:'It looks at you and says, "Hello $playername!"}". Later, in the presentation code, it takes all the items, sorts it into a list of lists, like '_itemGroup[_item.type].push("You have _item.name -- _item.description"'), then, once everything is grouped, print out each group in order with their group titles. At that time, the variables no longer exist. If I print during the sorting loop, it shows "You have Sentient Sword -- It looks at you and says 'Hello Bob!'" in a random position among the rest of the unsorted items. But if I do it in the presentation, when I put in a group title and place everything in their groups, if I've unset _item, it shows "You have _item.name -- _item.description". If I don't unset _item, then, every item under the every heading, including the "sword" heading where Sentient Sword is, it says "You have an apple -- it's a golden delicious.", because it was the last item in the list. I've since solved it for now by using a function that uses $(temp).wiki to flatten it into a temporary div and return the HTML from that, but I would like to know if there's a built-in way.