Wouldn't {{=item[link]}}  be the same as   {{=link.test1}}  or
{{=link[test1]}}  as in this example

response.topMenu = [dict(test1='test11', test2='test22')]

{{for link in response.topMenu:}}
        {{=link.test1}} or  {{=link[test1]}}
{{pass}}

On Dec 23, 3:40 pm, "Wes James" <compte...@gmail.com> wrote:
> On Tue, Dec 23, 2008 at 1:32 PM, mike <michal...@gmail.com> wrote:
>
> > Thanks for the reply, but just to make it more difficult, what if I
> > have an array of dict objects.
>
> > ex. [dict(test1='test11', test2='test22') ,dict(test1='test11',
> > test2='test22') ,dict(test1='test11', test2='test22') ,dict
> > (test1='test11', test2='test22') ]
>
> > how to I loop through it.
>
> response.topMenu=[dict(test1='test11',
> test2='test22'),dict(test3='test33', test4='test44')]
>
> {{for item in response.topMenu:}}
> {{for link in item.keys():}}
> {{=item[link]}}
> {{pass}}
> {{pass}}
>
> -wj
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to