Hello, I wonder how to do access the parent object with the same name
in a nested mustache:
one user has many dogs:
{{#user}}
{{name}}
{{#dogs}}
{{name}} <- the dog's name
here I want to show the user name, say {{user.name}} or
{{parent.name}} or {{user::name}}
{{/dogs}}
{{/users
Thanks.
--
Blog: http://www.dujinfang.com
Proj: http://www.freeswitch.org.cn
On Sat, Oct 16, 2010 at 1:33 AM, Seven Du <dujinfang@gmail.com> wrote: > Hello, I wonder how to do access the parent object with the same name > in a nested mustache: Like this: https://gist.github.com/3c91441597ac650146b9 But, there should probably be a better way.
Good idea. Thanks. On Mon, Oct 18, 2010 at 10:27 PM, Chris Wanstrath <chris@ozmm.org> wrote: > On Sat, Oct 16, 2010 at 1:33 AM, Seven Du <dujinfang@gmail.com> wrote: >> Hello, I wonder how to do access the parent object with the same name >> in a nested mustache: > > Like this: > > https://gist.github.com/3c91441597ac650146b9 > > But, there should probably be a better way. > -- Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn