在angularjs中查看树状结构

时间:2018-03-22 06:19:55

标签: javascript arrays angularjs multidimensional-array tree

我在树状结构中有Json,需要在视图模板上显示为树状结构 这是示例

   [
   {
"Software Products": [
  {
    "Programming Languages": [
      "Java API",
      "Python API"
    ]
  },
  {
    "Documentation": [
      "Java Docs",
      "Python Docs",
      {
        "HTTP Docs": [
          "REST Docs",
          "SOAP Docs"
        ]
      }
    ]
  },
  "Try It!"
]
 },
  {
"Cloud Products": [
  "SAAS",
  "PAAS",
  "IAAS"
]
 },
  {
"About Us": [
  {
    "Locations": [
      {
        "India": [
          "Delhi",
          {
            "Mumbai": [
              "Lower Parel",
              "Goregaon"
            ]
          },
          "Bangalore"
        ]
      },
      "USA",
      "Singapore"
    ]
  },
  "Founders",
  "Advisors"
]
 },
"Contact Us"
 ]

这只是示例,对象数组没有限制,可以更改键,如何在视图模板上将此数据显示为树结构?

0 个答案:

没有答案