8000 Recursive traversal · Issue #185 · olado/doT · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Recursive traversal #185
Closed
Closed
@jiuker

Description

@jiuker

if we have a data that is like this:

var showData = {
                    data: [{
                        data: [{
                            data: [],
                            show: [{
                                a: 7
                            }, {
                                a: 8
                            }, {
                                a: 9
                            }]
                        }],
                        show: [{
                            a: 4
                        }, {
                            a: 5
                        }, {
                            a: 6
                        }]
                    }],
                    show: [{
                        a: 1
                    }, {
                        a: 2
                    }, {
                        a: 3
                    }]
                }

but it has unkown floors,
now I do like this:

{{##def.s: 
                        {{~it.show:v:i}}
                       xx{{=v.a}}
                        {{~}} 
                        {{? it.data.length!=0}}
                     {{~it.data}} 
                     {{ out +=partText(v);}} //this is very importemt
                     {{~}} 
                     {{?}}
                        #}} 
                      {{#def.s}}
var partText = doT.template(parttmpl.text);

I think you should add this surport,dont like me

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0