Working with Knockout 'foreach' looping through multidimensional array

前端 未结 3 999
粉色の甜心
粉色の甜心 2021-01-13 12:59

I have a multidimensional associative array.

this.items = ko.observableArray([
    { name: \"name1\", viewable: true, children: [
        { name: \"name1-1\"         


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-13 13:52

    What you need is a template:

    
    

    And then just:

    提交回复
    热议问题