XTemplate

var tpl = new Ext.XTemplate(
    '<fieldset style="padding:10px;width:250px;"><legend>{title}</legend>',
    '<tpl for="foods">',
        '<div>{quantity} - {name} ({desc})</div>',
    '</tpl>',
    '</fieldset>'
);
tpl.compile();
 
var shoppingList = {
    title: 'Shopping List',
    foods: [
    	{quantity: '5', name: 'Apples', desc: 'Red and juicy'},
    	{quantity: '1', name: 'Bread', desc: 'Whole wheat'},
    	{quantity: '2', name: 'Cookies', desc: 'Chocolate chip'}
    ]
};
tpl.append('shoppingList', shoppingList);